r6990 - online-desktop/trunk/pyddm/ddm
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r6990 - online-desktop/trunk/pyddm/ddm
- Date: Fri, 7 Dec 2007 15:36:32 -0600 (CST)
Author: otaylor
Date: 2007-12-07 15:36:32 -0600 (Fri, 07 Dec 2007)
New Revision: 6990
Modified:
online-desktop/trunk/pyddm/ddm/DataModel.py
Log:
Improve error logging; fix problem with unicode string values
Modified: online-desktop/trunk/pyddm/ddm/DataModel.py
===================================================================
--- online-desktop/trunk/pyddm/ddm/DataModel.py 2007-12-07 21:31:42 UTC (rev 6989)
+++ online-desktop/trunk/pyddm/ddm/DataModel.py 2007-12-07 21:36:32 UTC (rev 6990)
@@ -1,4 +1,7 @@
-import re,logging
+import re
+import logging
+import traceback
+import sys
import dbus
import dbus.service
@@ -168,7 +171,7 @@
except KeyError:
raise Exception("Resource-valued element points to a resource we don't know about: " + str(value))
elif type_byte == ord('s') or type_byte == ord('u'):
- value = value.__str__()
+ value = unicode(value)
elif type_byte == ord('b'):
value = bool(value)
@@ -212,7 +215,7 @@
try:
self.__model._update_resource_from_dbus(resource_struct, notifications=notifications)
except Exception, e:
- _logger.error("Failed to update resource from a Notify", e)
+ _logger.error("Failed to update resource from a Notify", exc_info=True)
notifications.send()
@@ -233,7 +236,7 @@
if resource != None and not indirect:
result.append(resource)
except Exception, e:
- _logger.error("Failed to update resource from a query reply: " + e.message)
+ _logger.error("Failed to update resource from a query reply", exc_info=True)
notifications.send()
self._on_success(result)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]