Skip to content

Commit

Permalink
Merge pull request #203 from ofek/patch-1
Browse files Browse the repository at this point in the history
[gpg] Fix return code check
  • Loading branch information
lukpueh authored Jan 30, 2020
2 parents 1dbf547 + 73fedd0 commit 992a944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion securesystemslib/gpg/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def create_signature(content, keyid=None, homedir=None):
# TODO: It's suggested to take a look at `--status-fd` for proper error
# reporting, as there is no clear distinction between the return codes
# https://lists.gnupg.org/pipermail/gnupg-devel/2005-December/022559.html
if process.returncode is not 0:
if process.returncode != 0:
raise securesystemslib.gpg.exceptions.CommandError("Command '{}' returned "
"non-zero exit status '{}', stderr was:\n{}.".format(process.args,
process.returncode, process.stderr.decode()))
Expand Down

0 comments on commit 992a944

Please sign in to comment.