Skip to content

Commit

Permalink
add python 3 support to telepathy-gabble-xmpp-console
Browse files Browse the repository at this point in the history
  • Loading branch information
bkabrda authored and Guillaume Desmottes committed Sep 2, 2014
1 parent a35174d commit 3d51621
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions plugins/telepathy-gabble-xmpp-console
Original file line number Diff line number Diff line change
Expand Up @@ -355,13 +355,13 @@ class Window(Gtk.Window):
bus_name, sidecar_path, CONSOLE_IFACE, None)

except GLib.GError as e:
print """
print("""
Couldn't connect to the XMPP console interface on '%(name)s':
%(e)s
Check that you have the console plugin installed.""" % {
'name': request.get_account().get_path_suffix(),
'e': e,
}
})
raise SystemExit(2)

self.__build_ui()
Expand All @@ -377,8 +377,8 @@ Check that you have the console plugin installed.""" % {
try:
self.snoopy.teardown()
except GLib.GError, e:
print "Couldn't turn off the monitor (maybe the connection went away?)"
print e
print("Couldn't turn off the monitor (maybe the connection went away?)")
print(e)
Gtk.main_quit()

def usage(am):
Expand All @@ -387,7 +387,7 @@ def usage(am):
for account in am.dup_valid_accounts()
if account.get_cm_name() == 'gabble')

print """
print("""
Usage:
%(arg0)s gabble/jabber/blahblah
Expand All @@ -397,14 +397,14 @@ Here are some account identifiers:
%(accounts)s
""" % { 'arg0': sys.argv[0],
'accounts': '\n '.join(xmpp_accounts),
}
})
raise SystemExit(1)

def am_prepared_cb(am, result, account_suffix):
try:
am.prepare_finish(result)
except GLib.GError as e:
print e
print(e)
raise SystemExit(2)

if account_suffix is None:
Expand All @@ -413,7 +413,7 @@ def am_prepared_cb(am, result, account_suffix):
for account in am.dup_valid_accounts():
if account.get_path_suffix() == account_suffix:
if account.get_connection() is None:
print "%s is not online." % account_suffix
print("%s is not online." % account_suffix)
raise SystemExit(2)
else:
win = Window(account)
Expand Down

0 comments on commit 3d51621

Please sign in to comment.