summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--unrpyc/decompiler.py19
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