Commit 758504e4 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[common] Clean all sys.exit calls.

parent 151292b5
......@@ -725,9 +725,7 @@ def check(prefix, type, names):
"""
names = make_up_local_list(prefix, type, names)
n = sum([check_one(prefix, type, name) for name in names])
sys.exit(n)
return n
return sum([check_one(prefix, type, name) for name in names])
def fetch_object(webapi, type, name, fields):
......@@ -1172,7 +1170,6 @@ def delete_local(prefix, type, names):
storage.remove()
sys.exit(status)
return status
......@@ -1218,7 +1215,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
......@@ -1295,7 +1292,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