summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBohuslav Slavek Kabrda <bkabrda@redhat.com>2014-09-02 10:23:44 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-09-02 10:24:23 +0200
commit3d516218007a5f029932ffc85138a1f620553f1b (patch)
tree106902f18046b2323279b21287dae6c9d9a74000
parenta35174d5dfe6594f013e2fc0c7a286ef53e0d3fb (diff)
add python 3 support to telepathy-gabble-xmpp-console
https://bugs.freedesktop.org/show_bug.cgi?id=80803
-rwxr-xr-xplugins/telepathy-gabble-xmpp-console16
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/telepathy-gabble-xmpp-console b/plugins/telepathy-gabble-xmpp-console
index a72c92b55..c073423f8 100755
--- a/plugins/telepathy-gabble-xmpp-console
+++ b/plugins/telepathy-gabble-xmpp-console
@@ -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()
@@ -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):
@@ -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
@@ -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:
@@ -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)