GPG Password checker throws error only when process has not been terminated

This commit is contained in:
Anshum Gupta 2017-08-28 14:46:27 -07:00
parent e2474be5ea
commit 47e7fbc4dc
1 changed files with 1 additions and 1 deletions

View File

@ -54,7 +54,7 @@ def runAndSendGPGPassword(command, password):
p.stdin.write('\n'.encode('UTF-8')) p.stdin.write('\n'.encode('UTF-8'))
result = p.poll() result = p.poll()
if result != 0: if result is not None:
msg = ' FAILED: %s [see log %s]' % (command, LOG) msg = ' FAILED: %s [see log %s]' % (command, LOG)
print(msg) print(msg)
raise RuntimeError(msg) raise RuntimeError(msg)