third_party.pylibs.pylint.src/test/input/func_w0711.py
Tim Hatch 9df0acbb8a Adds check for boolop being used as exception class. Closes #100707.
---
 .../third_party/py/pylint/checkers/exceptions.py   |    7 +++++++
 .../third_party/py/pylint/test/input/func_w0711.py |   15 +++++++++++++++
 .../py/pylint/test/messages/func_w0711.txt         |    4 ++++
 3 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100644 /test/input/func_w0711.py
 create mode 100644 /test/messages/func_w0711.txt
2012-08-29 09:05:26 +02:00

16 lines
325 B
Python

"""find binary operations used as exceptions
"""
__revision__ = 1
try:
__revision__ += 1
except Exception or StandardError:
print "caught1"
except Exception and StandardError:
print "caught2"
except (Exception or StandardError):
print "caught3"
except (Exception or StandardError), exc:
print "caught4"