deskbar-applet r2300 - in trunk: . deskbar/core deskbar/handlers



Author: sebp
Date: Thu Aug  7 08:00:40 2008
New Revision: 2300
URL: http://svn.gnome.org/viewvc/deskbar-applet?rev=2300&view=rev

Log:
Stay compatible with Python 2.4 syntax

Modified:
   trunk/ChangeLog
   trunk/deskbar/core/Utils.py
   trunk/deskbar/handlers/calculator.py

Modified: trunk/deskbar/core/Utils.py
==============================================================================
--- trunk/deskbar/core/Utils.py	(original)
+++ trunk/deskbar/core/Utils.py	Thu Aug  7 08:00:40 2008
@@ -137,12 +137,13 @@
     loader = gtk.gdk.PixbufLoader()
     
     try:
-        loader.set_size(deskbar.ICON_HEIGHT, deskbar.ICON_HEIGHT)
-        loader.write(base64.b64decode(base64_str))
-    except Exception, e:
-        LOGGER.warning ("Failed to read base64 encoded image: %s" % e)
-    except gobject.GError, ee:
-        LOGGER.warning ("Failed to read base64 encoded image: %s" % ee)
+        try:
+            loader.set_size(deskbar.ICON_HEIGHT, deskbar.ICON_HEIGHT)
+            loader.write(base64.b64decode(base64_str))
+        except Exception, e:
+            LOGGER.warning ("Failed to read base64 encoded image: %s" % e)
+        except gobject.GError, ee:
+            LOGGER.warning ("Failed to read base64 encoded image: %s" % ee)
     finally:
         loader.close()
         

Modified: trunk/deskbar/handlers/calculator.py
==============================================================================
--- trunk/deskbar/handlers/calculator.py	(original)
+++ trunk/deskbar/handlers/calculator.py	Thu Aug  7 08:00:40 2008
@@ -193,7 +193,7 @@
             else:
                 return None
        except Exception, e:
-           LOGGER.debug (e.message)
+           LOGGER.debug (str(e))
            return None
     
     def query (self, query):



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