Merge branch 'cli-auto-exit' of https://github.com/kkka/onionshare into kkka-cli-auto-exit

Conflicts:
	onionshare/onionshare.py
This commit is contained in:
Micah Lee 2014-09-15 18:44:45 +00:00
commit 2cf6bd94e9

View File

@ -254,16 +254,13 @@ def main():
print strings._("ctrlc_to_stop")
# wait for app to close
running = True
while running:
try:
time.sleep(0.5)
except KeyboardInterrupt:
running = False
web.stop(app.port)
# shutdown
app.cleanup()
try:
t.join()
except KeyboardInterrupt:
web.stop(app.port)
finally:
# shutdown
app.cleanup()
if __name__ == '__main__':
main()