mirror of
https://github.com/zulip/zulip.git
synced 2026-06-24 21:08:25 +08:00
End compile-handlebars-templates gracefully.
Catch KeyboardInterrupt from tools/compile-handlebars-templates, print a message and exit when running in forever mode.
This commit is contained in:
parent
1ea6171179
commit
09400a7e50
@ -47,5 +47,9 @@ def run_forever():
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) == 2 and sys.argv[1] == 'forever':
|
||||
run_forever()
|
||||
run()
|
||||
try:
|
||||
run_forever()
|
||||
except KeyboardInterrupt:
|
||||
print(sys.argv[0], "exited after receiving KeyboardInterrupt")
|
||||
else:
|
||||
run()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user