From 887a00684922d1067527f150ee147ee3ff311418 Mon Sep 17 00:00:00 2001 From: rocky Date: Sun, 23 Jun 2019 21:09:41 -0400 Subject: [PATCH] if/elif for 2.5-2.7 Specifically simple_source/03_if_elif.py --- uncompyle6/semantics/pysource.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/uncompyle6/semantics/pysource.py b/uncompyle6/semantics/pysource.py index d8066947..af7f907d 100644 --- a/uncompyle6/semantics/pysource.py +++ b/uncompyle6/semantics/pysource.py @@ -671,6 +671,11 @@ class SourceWalker(GenericASTTraversal, object): n = n[0][0] elif n[0].kind in ('lastc_stmt', 'lastl_stmt'): n = n[0] + if n[0].kind in ('ifstmt', 'iflaststmt', 'ifelsestmtl'): + # This seems needed for Python 2.5-2.7 + n = n[0] + pass + pass else: if not preprocess: self.default(node)