gvsig-scripting / org.gvsig.scripting / trunk / org.gvsig.scripting / org.gvsig.scripting.app / org.gvsig.scripting.app.mainplugin / src / main / resources-plugin / scripting / lib / pylint / test / input / func_bad_assigment_to_exception_var.py @ 745
History | View | Annotate | Download (482 Bytes)
1 |
# pylint:disable=C0103, print-statement, no-absolute-import
|
---|---|
2 |
"""ho ho ho"""
|
3 |
from __future__ import print_function |
4 |
import sys |
5 |
__revision__ = 'toto'
|
6 |
|
7 |
e = 1
|
8 |
e2 = 'yo'
|
9 |
e3 = None
|
10 |
try:
|
11 |
raise e
|
12 |
except Exception as ex: |
13 |
print(ex) |
14 |
_, _, tb = sys.exc_info() |
15 |
|
16 |
|
17 |
|
18 |
def func(): |
19 |
"""bla bla bla"""
|
20 |
raise e3
|
21 |
|
22 |
def reraise(): |
23 |
"""reraise a catched exception instance"""
|
24 |
try:
|
25 |
raise Exception() |
26 |
except Exception as exc: |
27 |
print(exc) |
28 |
raise exc
|
29 |
|
30 |
raise e3
|