From 0d5d37a21143ee6d637132bef6440aea57b7d2bd Mon Sep 17 00:00:00 2001 From: Zev Benjamin Date: Fri, 28 Feb 2014 14:00:03 -0500 Subject: [PATCH] jabber_mirror: Exit if we fail to connect to the Jabber server (imported from commit f5cc600325a3547412cf0b05239c988410354c10) --- bots/jabber_mirror.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bots/jabber_mirror.py b/bots/jabber_mirror.py index dabfaaf..08bf7bd 100755 --- a/bots/jabber_mirror.py +++ b/bots/jabber_mirror.py @@ -236,7 +236,10 @@ user and mirrors messages sent to Jabber rooms to Zulip.'''.replace("\n", " ")) xmpp = JabberToZulipBot(options.jabber_username, options.jabber_domain, options.jabber_password, rooms, openfire=options.openfire) - xmpp.connect(use_tls=not options.no_use_tls) + + if not xmpp.connect(use_tls=not options.no_use_tls): + sys.exit("Unable to connect to Jabber server") + xmpp.set_zulip_client(zulip) zulip.set_jabber_client(xmpp)