Keep the Usage of exit()/sys.exit() Consistent
It's better to keep the usage of exit()/sys.exit() consistent in one file. Furthermore, sys.exit() is considered good to be used in production code, while exit is for interactive shell. Change-Id: Ia3092853a648922588e2bc11db37d6decdec1b48
This commit is contained in:
parent
e6c28c4ac7
commit
3b94bd4540
@ -59,7 +59,7 @@ Lists old Swift processes.
|
|||||||
listing.append((str(hours), pid, args))
|
listing.append((str(hours), pid, args))
|
||||||
|
|
||||||
if not listing:
|
if not listing:
|
||||||
exit()
|
sys.exit()
|
||||||
|
|
||||||
hours_len = len('Hours')
|
hours_len = len('Hours')
|
||||||
pid_len = len('PID')
|
pid_len = len('PID')
|
||||||
|
@ -93,7 +93,7 @@ Example (sends SIGTERM to all orphaned Swift processes older than two hours):
|
|||||||
listing.append((str(hours), pid, args))
|
listing.append((str(hours), pid, args))
|
||||||
|
|
||||||
if not listing:
|
if not listing:
|
||||||
exit()
|
sys.exit()
|
||||||
|
|
||||||
hours_len = len('Hours')
|
hours_len = len('Hours')
|
||||||
pid_len = len('PID')
|
pid_len = len('PID')
|
||||||
|
Loading…
Reference in New Issue
Block a user