diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2014-03-29 11:20:10 +0100 |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2014-03-29 11:20:10 +0100 |
commit | 7b85f86578d7cbd203192dcd189f3fc375163339 (patch) | |
tree | f6219d8b532bf172d4734da396a3f59af972bfcf | |
parent | 06c713990a87d3c10cd02749ee7e0ee44220ea4c (diff) | |
download | pyflakes-7b85f86578d7cbd203192dcd189f3fc375163339.tar.gz |
Use the PY32 constant for the AST change in Python 3.3
-rw-r--r-- | pyflakes/__init__.py | 2 | ||||
-rw-r--r-- | pyflakes/checker.py | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/pyflakes/__init__.py b/pyflakes/__init__.py index 53bc072..71722ee 100644 --- a/pyflakes/__init__.py +++ b/pyflakes/__init__.py @@ -1,2 +1,2 @@ -__version__ = '0.8' +__version__ = '0.8.1a0' diff --git a/pyflakes/checker.py b/pyflakes/checker.py index e756ff4..6e1f1d1 100644 --- a/pyflakes/checker.py +++ b/pyflakes/checker.py @@ -37,12 +37,12 @@ except ImportError: # Python 2.5 for item in field: yield item # Python >= 3.3 uses ast.Try instead of (ast.TryExcept + ast.TryFinally) -if hasattr(ast, 'Try'): - ast_TryExcept = ast.Try - ast_TryFinally = () -else: +if PY32: ast_TryExcept = ast.TryExcept ast_TryFinally = ast.TryFinally +else: + ast_TryExcept = ast.Try + ast_TryFinally = () from pyflakes import messages |