FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix python 2.x issues · sdpython/pythonnet@dd5e2b6 · GitHub

This repository was archived by the owner on Jul 22, 2023. It is now read-only.

Repository navigation

Commit dd5e2b6

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

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎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)

Back | FazBrowse Home | New Git URL