diff --git a/src/utils/__init__.py b/src/utils/__init__.py index eb82cb563..5f0cf2c8f 100644 --- a/src/utils/__init__.py +++ b/src/utils/__init__.py @@ -48,19 +48,12 @@ def split(s): csv.join = join csv.split = split -builtins = (__builtins__ if isinstance(__builtins__, dict) else __builtins__.__dict__) - - -# We use this often enough that we're going to stick it in builtins. def force(x): if callable(x): return x() else: return x -builtins['force'] = force -# These imports need to happen below the block above, so things get put into -# __builtins__ appropriately. from .gen import * from . import crypt, error, file, iter, net, python, seq, str, time, transaction, web diff --git a/src/utils/file.py b/src/utils/file.py index 2fbe6140b..447430add 100644 --- a/src/utils/file.py +++ b/src/utils/file.py @@ -36,7 +36,7 @@ import shutil import os.path -from . import crypt +from . import crypt, force def sanitizeName(filename): """Removes / from filenames and escapes them if they are '.' or '..'."""