diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-21 12:55:52 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-21 12:55:52 -0400 |
commit | e526f3df818ea21760c5eeb4e2f728845bb93140 (patch) | |
tree | 1dfc39e5d1b281accf5e4c56fbc57542c8d62593 /unrpyc/decompiler.py | |
parent | a1bdc1283d2464bff2bc725988b2fdc74b34ef74 (diff) | |
download | html5ks-e526f3df818ea21760c5eeb4e2f728845bb93140.tar.xz html5ks-e526f3df818ea21760c5eeb4e2f728845bb93140.zip |
continue work on i18n
Diffstat (limited to 'unrpyc/decompiler.py')
-rw-r--r-- | unrpyc/decompiler.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/unrpyc/decompiler.py b/unrpyc/decompiler.py index 95aebf7..ee55ef1 100644 --- a/unrpyc/decompiler.py +++ b/unrpyc/decompiler.py @@ -274,14 +274,12 @@ class PrintRenPython(python_ast.NodeVisitor): return '"%s"' % node.attr def visit_Assign(self, node): - if not isinstance(node.targets[0], python_ast.Subscript): - if isinstance(node.targets[0], python_ast.Name): - id = node.targets[0].id - if id == 'suppress_window_after_timeskip' or id == '_window': - return - else: + if isinstance(node.targets[0], python_ast.Subscript): return - print(python_ast.dump(node)) + if isinstance(node.targets[0], python_ast.Name): + id = node.targets[0].id + if id == 'suppress_window_before_timeskip' or id == 'suppress_window_after_timeskip' or id == '_window': + return self.f.write(self.visit(node.targets[0])) self.f.write(': ') self.f.write(self.visit(node.value)) |