Skip to content

Commit

Permalink
Use a different variable name. Fixes #3961. Workaround for astral-sh/…
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jun 21, 2023
1 parent 767c968 commit 2ea139e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions setuptools/tests/test_packageindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def test_bad_url_bad_port(self):
url = 'http://127.0.0.1:0/nonesuch/test_package_index'
try:
v = index.open_url(url)
except Exception as v:
assert url in str(v)
except Exception as exc:
assert url in str(exc)
else:
assert isinstance(v, urllib.error.HTTPError)

Expand All @@ -48,8 +48,8 @@ def test_bad_url_typo(self):
)
try:
v = index.open_url(url)
except Exception as v:
assert url in str(v)
except Exception as exc:
assert url in str(exc)
else:
assert isinstance(v, urllib.error.HTTPError)

Expand Down

0 comments on commit 2ea139e

Please sign in to comment.