[rhythmbox] Port rbzeitgeist plugin to Python 3



commit 54ec6cffe8b1ee19127415866fb922749c611a42
Author: Kalev Lember <kalevlember gmail com>
Date:   Tue Sep 10 15:55:39 2013 +0200

    Port rbzeitgeist plugin to Python 3
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707860

 plugins/rbzeitgeist/rbzeitgeist.py |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/plugins/rbzeitgeist/rbzeitgeist.py b/plugins/rbzeitgeist/rbzeitgeist.py
index 984fd5b..b04a082 100644
--- a/plugins/rbzeitgeist/rbzeitgeist.py
+++ b/plugins/rbzeitgeist/rbzeitgeist.py
@@ -37,8 +37,8 @@ from zeitgeist.datamodel import Event, Subject, Interpretation, Manifestation
 
 try:
     IFACE = ZeitgeistClient()
-except RuntimeError, e:
-    print "Unable to connect to Zeitgeist, won't send events. Reason: '%s'" %e
+except RuntimeError as e:
+    print("Unable to connect to Zeitgeist, won't send events. Reason: '%s'" % e)
     IFACE = None
 
 class ZeitgeistPlugin(GObject.Object, Peas.Activatable):
@@ -46,12 +46,12 @@ class ZeitgeistPlugin(GObject.Object, Peas.Activatable):
     object = GObject.property(type=GObject.Object)
 
     def __init__(self):
-       GObject.Object.__init__(self)
+        GObject.Object.__init__(self)
 
     def do_activate(self):
-        print "Loading Zeitgeist plugin..."
+        print("Loading Zeitgeist plugin...")
         if IFACE is not None:
-           shell = self.object
+            shell = self.object
             shell_player = shell.props.shell_player
             self.__psc_id = shell_player.connect("playing-song-changed", self.playing_song_changed)
 
@@ -109,7 +109,7 @@ class ZeitgeistPlugin(GObject.Object, Peas.Activatable):
         idle, it means there are no more signals scheduled, so we
         will have already received the eos if it was coming.
         """
-       shell = self.object
+        shell = self.object
         db = shell.props.db
         GLib.idle_add(self.send_to_zeitgeist, db, entry, event_type)
 
@@ -150,9 +150,9 @@ class ZeitgeistPlugin(GObject.Object, Peas.Activatable):
         f.query_info_async(Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE, Gio.FileQueryInfoFlags.NONE, 
GLib.PRIORITY_DEFAULT, None, file_info_complete, None)
 
     def do_deactivate(self):
-        print "Deactivating Zeitgeist plugin..."
+        print("Deactivating Zeitgeist plugin...")
         if IFACE is not None:
-           shell = self.object
+            shell = self.object
             shell_player = shell.props.shell_player
             shell_player.disconnect(self.__psc_id)
             self.__psc_id = None


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]