-
Notifications
You must be signed in to change notification settings - Fork 306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle missing GPG executable graciously #484
Conversation
If GPG not installed, handle the FileNotFound exception. Fall back to trying with gpg2 if the original call was to gpg.
I've added some |
Looks like py2 doesn't have |
Codecov Report
@@ Coverage Diff @@
## master #484 +/- ##
==========================================
+ Coverage 84.24% 84.56% +0.32%
==========================================
Files 14 14
Lines 768 784 +16
Branches 114 115 +1
==========================================
+ Hits 647 663 +16
- Misses 84 85 +1
+ Partials 37 36 -1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #484 +/- ##
==========================================
+ Coverage 84.24% 84.62% +0.38%
==========================================
Files 14 14
Lines 768 787 +19
Branches 114 115 +1
==========================================
+ Hits 647 666 +19
Misses 84 84
Partials 37 37
Continue to review full report at Codecov.
|
twine/package.py
Outdated
print("{} executable not available.".format(gpg_args[0])) | ||
|
||
if not gpg_args[0] == "gpg": | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be
gpg_args[0] != "gpg"
And in this case, if we've tried with gpg2
(which I presume is the assumption made here) we should not just silently allow a failure. People are expecting signatures to be generated, we must raise an exception and halt progress.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I've updated the PR so that we always raise exception if not able to sign.
Travis had some connection issues, so I closed/reopened to rerun CI verification. |
Thank you! 🎉 |
@allhailwesttexas Can you add an entry to the changelog? |
If GPG not installed, handle the FileNotFound exception.
Fall back to trying with gpg2 if the original call was to gpg.
Closes #456