jabber_mirror: Exit if we fail to connect to the Jabber server
(imported from commit f5cc600325a3547412cf0b05239c988410354c10)
This commit is contained in:
parent
52be065eda
commit
0d5d37a211
|
@ -236,7 +236,10 @@ user and mirrors messages sent to Jabber rooms to Zulip.'''.replace("\n", " "))
|
||||||
xmpp = JabberToZulipBot(options.jabber_username, options.jabber_domain,
|
xmpp = JabberToZulipBot(options.jabber_username, options.jabber_domain,
|
||||||
options.jabber_password, rooms,
|
options.jabber_password, rooms,
|
||||||
openfire=options.openfire)
|
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)
|
xmpp.set_zulip_client(zulip)
|
||||||
zulip.set_jabber_client(xmpp)
|
zulip.set_jabber_client(xmpp)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue