diff options
author | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-21 11:13:11 -0400 |
---|---|---|
committer | Alex Xu <alex_y_xu@yahoo.ca> | 2013-08-21 11:13:11 -0400 |
commit | a1bdc1283d2464bff2bc725988b2fdc74b34ef74 (patch) | |
tree | ff326d08a34e11af4ad4608fe134dba9f91e54de | |
parent | e4c006b866a6d9b0ea34e7cfd8e3510168f535a6 (diff) | |
download | html5ks-a1bdc1283d2464bff2bc725988b2fdc74b34ef74.tar.xz html5ks-a1bdc1283d2464bff2bc725988b2fdc74b34ef74.zip |
work on i18n
-rw-r--r-- | unrpyc/decompiler.py | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/unrpyc/decompiler.py b/unrpyc/decompiler.py index 9180098..95aebf7 100644 --- a/unrpyc/decompiler.py +++ b/unrpyc/decompiler.py @@ -275,10 +275,17 @@ class PrintRenPython(python_ast.NodeVisitor): def visit_Assign(self, node): if not isinstance(node.targets[0], python_ast.Subscript): - self.f.write(self.visit(node.targets[0])) - self.f.write(': ') - self.f.write(self.visit(node.value)) - self.f.write(',\n') + if isinstance(node.targets[0], python_ast.Name): + id = node.targets[0].id + if id == 'suppress_window_after_timeskip' or id == '_window': + return + else: + return + print(python_ast.dump(node)) + self.f.write(self.visit(node.targets[0])) + self.f.write(': ') + self.f.write(self.visit(node.value)) + self.f.write(',\n') def visit_Call(self, node): self.f.write('[') @@ -327,10 +334,6 @@ class PrintRenPython(python_ast.NodeVisitor): def visit_keyword(self, node): return self.visit(node.value) - def visit(self, node): - self.f.write(python_ast.dump(node)) - return super().visit(node) - def print_Python(f, stmt, indent_level, early=False): code_src = stmt.code.source |