Removed unnecessary version checks
Fixed 2 memory leaks in restricted.py
This commit is contained in:
+2
-3
@@ -79,15 +79,14 @@ alert_dependency = ['hashlib', 'uuid']
|
||||
# python version.
|
||||
#
|
||||
# List of modules deprecated in Python 2.6 or 2.7 that are in the above set
|
||||
py26_deprecated = ['mhlib', 'multifile', 'mimify', 'sets', 'MimeWriter']
|
||||
py27_deprecated = [] # ['optparse'] but we need it for now
|
||||
py27_deprecated = ['mhlib', 'multifile', 'mimify', 'sets', 'MimeWriter'] # And ['optparse'] but we need it for now
|
||||
|
||||
if python_version >= '2.6':
|
||||
base_modules += ['json', 'multiprocessing']
|
||||
base_modules = list(set(base_modules).difference(set(py26_deprecated)))
|
||||
|
||||
if python_version >= '2.7':
|
||||
base_modules += ['argparse']
|
||||
base_modules += ['argparse', 'json', 'multiprocessing']
|
||||
base_modules = list(set(base_modules).difference(set(py27_deprecated)))
|
||||
|
||||
# Now iterate in the base_modules, trying to do the import
|
||||
|
||||
Reference in New Issue
Block a user