Fix utils.gen.safeEval to work with instances of ast.NameConstant (introduced in Pythn 3.4).

This commit is contained in:
Valentin Lorentz 2014-04-19 10:16:56 +02:00
parent 65aed8f7ed
commit 28536f0528

View File

@ -187,6 +187,9 @@ def safeEval(s, namespace={'True': True, 'False': False, 'None': None}):
return True
else:
return False
elif sys.version_info[0:2] >= (3, 4) and \
node.__class__ is ast.NameConstant:
return True
else:
return False
if checkNode(node):