Commit eae8b088 authored by Theophile GENTILHOMME's avatar Theophile GENTILHOMME
Browse files

[common] Add sys.exit(...)

Needed to get correct exit code from Click commands (otherwise always
return 0)
parent 774429d5
......@@ -1172,6 +1172,7 @@ def delete_local(prefix, type, names):
storage.remove()
sys.exit(status)
return status
......@@ -1217,7 +1218,7 @@ def delete_remote(webapi, type, names):
"reason: %s", type, webapi.platform, webapi.user,
six.moves.http_client.responses[status_code])
status += 1
sys.exit(status)
return status
......@@ -1294,7 +1295,7 @@ def status(webapi, prefix, type):
for key in set(remote.keys()) - set(local):
logger.extra('[r] %s/%s (@%s)', TYPE_PLURAL[type], key,
remote[key]['creation_date'])
sys.exit(0)
return 0, retval
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment