The `info` command always exits with success, even if
the patch didn't exist.
Modified to exit with a non-zero exit status and
print an error message in that case.
Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Reviewed-by: Stephen Finucane <stephen@that.guru>
def action_info(rpc, patch_id):
patch = rpc.patch_get(patch_id)
+
+ if patch == {}:
+ sys.stderr.write("Error getting information on patch ID %d\n" %
+ patch_id)
+ sys.exit(1)
+
s = "Information for patch id %d" % (patch_id)
print(s)
print('-' * len(s))