Clean up
This commit is contained in:
@@ -2,10 +2,12 @@
|
||||
|
||||
import codejail.safe_exec
|
||||
|
||||
# This will set up the name "random" as a properly-seeded stand-in for the
|
||||
# random module. Also, capa assumes float-friendly division always.
|
||||
# Establish the Python environment for Capa.
|
||||
# Capa assumes float-friendly division always.
|
||||
# The name "random" is a properly-seeded stand-in for the random module.
|
||||
CODE_PROLOG = """\
|
||||
from __future__ import division
|
||||
|
||||
import random as random_module
|
||||
random = random_module.Random(%r)
|
||||
random.Random = random_module.Random
|
||||
|
||||
@@ -73,7 +73,7 @@ def safe_exec(code, globals_dict, locals_dict, assumed_imports=None, files=None,
|
||||
jailed_code = "".join(the_code)
|
||||
|
||||
# Turn this on to see what's being executed.
|
||||
if 1:
|
||||
if 0:
|
||||
print "--{:-<40}".format(" jailed ")
|
||||
print jailed_code
|
||||
print "--{:-<40}".format(" exec ")
|
||||
|
||||
Reference in New Issue
Block a user