Skip to content

Commit c147514

Browse files
committed
fix bug in using python2 AST rules in python 2.5
1 parent 813229a commit c147514

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

uncompyle6/parsers/parse25.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,11 @@ def add_custom_rules(self, tokens, customize):
4141
self.check_reduce['tryelsestmt'] = 'tokens'
4242

4343
def reduce_is_invalid(self, rule, ast, tokens, first, last):
44-
super(Python25Parser, self).reduce_is_invalid(rule, ast, tokens, first, last)
45-
44+
invalid = super(Python25Parser,
45+
self).reduce_is_invalid(rule, ast,
46+
tokens, first, last)
47+
if invalid:
48+
return invalid
4649
lhs = rule[0]
4750
if lhs in ('tryelsestmt', ):
4851
# The end of the else part of try/else come_from has to come

0 commit comments

Comments
 (0)