diff options
Diffstat (limited to 'Lib/lib2to3/fixes/fix_except.py')
-rw-r--r-- | Lib/lib2to3/fixes/fix_except.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/lib2to3/fixes/fix_except.py b/Lib/lib2to3/fixes/fix_except.py index dc2a5b1..5554c02 100644 --- a/Lib/lib2to3/fixes/fix_except.py +++ b/Lib/lib2to3/fixes/fix_except.py @@ -25,11 +25,11 @@ The following cases will be converted: from .. import pytree from ..pgen2 import token from .. import fixer_base -from ..fixer_util import Assign, Attr, Name, is_tuple, is_list +from ..fixer_util import Assign, Attr, Name, is_tuple, is_list, syms def find_excepts(nodes): for i, n in enumerate(nodes): - if isinstance(n, pytree.Node): + if n.type == syms.except_clause: if n.children[0].value == 'except': yield (n, nodes[i+2]) |