Removed unnecessary version checks

Fixed 2 memory leaks in restricted.py
This commit is contained in:
Leonel Câmara
2016-05-19 19:03:54 +01:00
parent 56b29553c5
commit 180ebcd7f1
6 changed files with 13 additions and 43 deletions
+2 -3
View File
@@ -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