Skip to content

Commit

Permalink
Password optional if client_cert is set
Browse files Browse the repository at this point in the history
  • Loading branch information
future-cyborg committed Jul 25, 2020
1 parent a72021f commit 08a82a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion twine/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,10 @@ def username(self) -> Optional[str]:
@property
def password(self) -> Optional[str]:
if self.client_cert:
return None
try:
return cast(Optional[str], self.auth.password)
except exceptions.NonInteractive:
return None

# Workaround for https://github.com/python/mypy/issues/5858
return cast(Optional[str], self.auth.password)
Expand Down

0 comments on commit 08a82a7

Please sign in to comment.