RPC client: exit code 1 if RPC server returned error

This commit is contained in:
JeremyRand 2020-05-10 06:34:27 +00:00
parent b891d3dc85
commit b72f8a8c9a
No known key found for this signature in database
GPG key ID: B3F2D165786D6570

View file

@ -433,6 +433,7 @@ if __name__ == '__main__':
print_msg(result)
elif type(result) is dict and result.get('error'):
print_stderr(result.get('error'))
sys_exit(1)
elif result is not None:
print_msg(json_encode(result))
sys_exit(0)