added debug option to usage description,

set generic error code to 1


Former-commit-id: 9163244e2c
This commit is contained in:
Arthur Lu 2021-09-21 23:36:13 +00:00
parent 8112effbce
commit 16882a0a75

View File

@ -401,7 +401,7 @@ def main(send, verbose = False, profile = False, debug = False):
loop_exit_code = 0 loop_exit_code = 0
break break
except Exception as e: except Exception as e:
send(stderr, ERR, "encountered an exception while running") send(stderr, ERR, "encountered an exception while running", code = 1)
print(e, file = stderr) print(e, file = stderr)
loop_exit_code = 1 loop_exit_code = 1
break break
@ -546,9 +546,9 @@ if __name__ == "__main__":
elif 'debug' == sys.argv[1]: elif 'debug' == sys.argv[1]:
start(None, debug = True) start(None, debug = True)
else: else:
print("usage: %s start|stop|restart|verbose|profile" % sys.argv[0]) print("usage: %s start|stop|restart|verbose|profile|debug" % sys.argv[0])
sys.exit(2) sys.exit(2)
sys.exit(0) sys.exit(0)
else: else:
print("usage: %s start|stop|restart|verbose|profile" % sys.argv[0]) print("usage: %s start|stop|restart|verbose|profile|debug" % sys.argv[0])
sys.exit(2) sys.exit(2)