aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-07-11 13:41:42 +0100
committerGravatar Gareth Coles <[email protected]>2018-07-11 13:41:42 +0100
commit23017a712dbc7dab9454a342b17d96451f82d86a (patch)
tree8a7bf4e5aa22573cefe5d2031299ba2e8c2badcc
parentMerge remote-tracking branch 'origin/master' (diff)
[Snekbox] Code template should activate snekbox prod VM
-rw-r--r--bot/cogs/snekbox.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/bot/cogs/snekbox.py b/bot/cogs/snekbox.py
index 2a68950bb..f49526884 100644
--- a/bot/cogs/snekbox.py
+++ b/bot/cogs/snekbox.py
@@ -15,6 +15,9 @@ RMQ_ARGS = {
}
CODE_TEMPLATE = """
+venv_file = "/snekbox/.venv/bin/activate_this.py"
+exec(open(venv_file).read(), dict(__file__=venv_file))
+
try:
{CODE}
except Exception as e: