diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-14 20:26:54 +0200 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2010-09-14 20:26:54 +0200 |
commit | d6d2a18ba629c4986f4730d8a29092a4f8403d08 (patch) | |
tree | d4ccae8d6ea08b7d5751c4fb82eaaf4ab2b2c004 | |
parent | typo fix (diff) | |
download | pyload-d6d2a18ba629c4986f4730d8a29092a4f8403d08.tar.xz |
extended parser
-rw-r--r-- | module/SafeEval.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/module/SafeEval.py b/module/SafeEval.py index 863ff48cc..bf2576502 100644 --- a/module/SafeEval.py +++ b/module/SafeEval.py @@ -44,7 +44,12 @@ class SafeEvalWithErrors(SafeEval): node.__class__,node) def visitName(self,node, **kw): - raise Unsafe_Source_Error("Strings must be quoted", + if node.name == "True": + return True + elif node.name == "False": + return False + else: + raise Unsafe_Source_Error("Strings must be quoted", node.name, node) # Add more specific errors if desired |