mirror of
https://github.com/progval/Limnoria.git
synced 2025-04-25 12:31:04 -05:00
Remove adding force to builtins (#1535)
This commit is contained in:
parent
9fceb85c41
commit
bc852379f5
@ -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
|
||||
|
||||
|
@ -36,7 +36,7 @@ import random
|
||||
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 '..'."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user