Skip to content

Commit 992a944

Browse files
author
lukpueh
authored
Merge pull request #203 from ofek/patch-1
[gpg] Fix return code check
2 parents 1dbf547 + 73fedd0 commit 992a944

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

securesystemslib/gpg/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def create_signature(content, keyid=None, homedir=None):
9999
# TODO: It's suggested to take a look at `--status-fd` for proper error
100100
# reporting, as there is no clear distinction between the return codes
101101
# https://lists.gnupg.org/pipermail/gnupg-devel/2005-December/022559.html
102-
if process.returncode is not 0:
102+
if process.returncode != 0:
103103
raise securesystemslib.gpg.exceptions.CommandError("Command '{}' returned "
104104
"non-zero exit status '{}', stderr was:\n{}.".format(process.args,
105105
process.returncode, process.stderr.decode()))

0 commit comments

Comments
 (0)