diff --git a/decompiler/atldecompiler.py b/decompiler/atldecompiler.py index 8fcac036..9f45aefd 100644 --- a/decompiler/atldecompiler.py +++ b/decompiler/atldecompiler.py @@ -57,7 +57,7 @@ def print_block(self, block): self.indent() self.write("pass") - def advance_to_block(self, block): + def advance_to_block(self, block): # note: the location property of a RawBlock points to the first line of the block, # not the statement that created it. # it can also contain the following nonsense if there was no block for some reason. diff --git a/decompiler/sl2decompiler.py b/decompiler/sl2decompiler.py index 08e4920d..c5f5d2a6 100644 --- a/decompiler/sl2decompiler.py +++ b/decompiler/sl2decompiler.py @@ -534,7 +534,7 @@ def sort_keywords_and_children(self, node, immediate_block=False, ignore_childre contents_grouped.insert(0, (block_lineno + 1, "keywords", [("as", keyword_as)])) # we can also put it on the start line if that one is available - elif contents_grouped[0][0] > start_line: + elif contents_grouped[0][0] > start_lineno: contents_grouped.insert(0, (start_lineno, "keywords", [("as", keyword_as)])) else: