mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Fix utils.gen.safeEval to work with instances of ast.NameConstant (introduced in Pythn 3.4).
This commit is contained in:
parent
65aed8f7ed
commit
28536f0528
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user