Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dd5e2b6

Browse files
testrunner123filmor
authored andcommitted
fix python 2.x issues
1 parent 57769f1 commit dd5e2b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tests/test_subclass.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def foo(self):
147147
except:
148148
e = sys.exc_info()
149149
assert "xyzname" in str(e[1])
150-
location = traceback.extract_tb(e[2], -1)[0]
150+
location = traceback.extract_tb(e[2])[-1]
151151
assert location[2] == "foo"
152152

153153
# call through managed code
@@ -157,7 +157,7 @@ def foo(self):
157157
except:
158158
e = sys.exc_info()
159159
assert "xyzname" in str(e[1])
160-
location = traceback.extract_tb(e[2], -1)[0]
160+
location = traceback.extract_tb(e[2])[-1]
161161
assert location[2] == "foo"
162162

163163

0 commit comments

Comments
 (0)