Some fixes to evlang that caused an assertionerror at startup.

This commit is contained in:
Griatch 2013-05-12 21:06:24 +02:00
parent 1488ccb912
commit 4854661889

View file

@ -480,12 +480,10 @@ def get_node_lineno(node):
# Deny evaluation of code if the AST contain any of the following nodes:
UNALLOWED_AST_NODES = set([
# 'Add', 'And',
'AssAttr',
# 'AssList',
# 'AssName',
# 'AssTuple',
# 'Assert', 'Assign', 'AugAssign',
'Backquote',
# 'Bitand', 'Bitor', 'Bitxor', 'Break',
# 'CallFunc', 'Class', 'Compare', 'Const', 'Continue',
# 'Decorators', 'Dict', 'Discard', 'Div',
@ -493,17 +491,17 @@ UNALLOWED_AST_NODES = set([
'Exec',
# 'Expression', 'FloorDiv',
# 'For',
'From',
'Function',
'FunctionDef',
# 'GenExpr', 'GenExprFor', 'GenExprIf', 'GenExprInner',
# 'Getattr', 'Global', 'If',
'Import',
'ImportFrom',
# 'Invert',
# 'Keyword', 'Lambda', 'LeftShift',
# 'List', 'ListComp', 'ListCompFor', 'ListCompIf', 'Mod',
# 'Module',
# 'Mul', 'Name', 'Node', 'Not', 'Or', 'Pass', 'Power',
'Print', 'Printnl',
'Print',
'Raise',
# 'Return', 'RightShift', 'Slice', 'Sliceobj',
# 'Stmt', 'Sub', 'Subscript',