Skip to content

Commit

Permalink
Merge pull request pypa#131 from sigmavirus24/bug/130
Browse files Browse the repository at this point in the history
Place --local-user and argument in middle of sign
  • Loading branch information
sigmavirus24 committed Sep 19, 2015
2 parents a0c8735 + 208fb8a commit cc90d16
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/test_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@ def test_sign_file_with_identity(monkeypatch):
pkg.sign('gpg', 'identity')
except IOError:
pass
args = ('gpg', '--detach-sign', '-a', filename, '--local-user', 'identity')
args = ('gpg', '--detach-sign', '--local-user', 'identity', '-a', filename)
assert replaced_check_call.calls == [pretend.call(args)]
3 changes: 2 additions & 1 deletion twine/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,10 @@ def metadata_dictionary(self):

def sign(self, sign_with, identity):
print("Signing {0}".format(self.basefilename))
gpg_args = (sign_with, "--detach-sign", "-a", self.filename)
gpg_args = (sign_with, "--detach-sign")
if identity:
gpg_args += ("--local-user", identity)
gpg_args += ("-a", self.filename)
subprocess.check_call(gpg_args)

with open(self.signed_filename, "rb") as gpg:
Expand Down

0 comments on commit cc90d16

Please sign in to comment.