Skip to content

Commit

Permalink
handle AttributeError by raising DisutilsSetupError in check_specifier
Browse files Browse the repository at this point in the history
  • Loading branch information
melissa-kun-li committed Feb 28, 2021
1 parent 1a54925 commit 85f824f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion setuptools/dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def check_specifier(dist, attr, value):
"""Verify that value is a valid version specifier"""
try:
packaging.specifiers.SpecifierSet(value)
except packaging.specifiers.InvalidSpecifier as error:
except (packaging.specifiers.InvalidSpecifier, AttributeError) as error:
tmpl = (
"{attr!r} must be a string "
"containing valid version specifiers; {error}"
Expand Down

0 comments on commit 85f824f

Please sign in to comment.