Dzahn has submitted this change and it was merged.

Change subject: Exit cleanly on ctrl-C
......................................................................


Exit cleanly on ctrl-C

Handy for local testing, catch KeyboardInterrupt and shutdown cleanly.

Change-Id: Idb24e6186c032af75cdad670f64a13d5257913ea
---
M jouncebot.py
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Alex Monk: Looks good to me, approved



diff --git a/jouncebot.py b/jouncebot.py
index d6454a8..7bc5641 100755
--- a/jouncebot.py
+++ b/jouncebot.py
@@ -202,7 +202,10 @@
 
     try:
         bot.start()
-    except Exception as ex:
+    except KeyboardInterrupt:
+        deploy_page.stop()
+        exit(0)
+    except Exception:
         logging.exception("Unhandled exception. Terminating.")
         deploy_page.stop()
         exit(1)

-- 
To view, visit https://gerrit.wikimedia.org/r/220676
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb24e6186c032af75cdad670f64a13d5257913ea
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/bots/jouncebot
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: Alex Monk <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Thcipriani <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to