[Sugar-devel] [PATCH 16/21 sugar-toolkit] pylint cleanup: pass format parameters to log functions instead of using %
Sascha Silbe
sascha-pgp at silbe.org
Fri Oct 15 17:01:20 EDT 2010
This avoids the overhead from the string formatting on production systems.
Signed-off-by: Sascha Silbe <sascha-pgp at silbe.org>
diff --git a/src/sugar/wm.py b/src/sugar/wm.py
index eaa196e..00c6fd0 100644
--- a/src/sugar/wm.py
+++ b/src/sugar/wm.py
@@ -32,7 +32,7 @@ def _property_get_trapped(window, prop, prop_type):
error = gtk.gdk.error_trap_pop()
if error:
logging.debug('Received X Error (%i) while getting '
- 'a property on a window' % error)
+ 'a property on a window', error)
return prop_info
@@ -45,7 +45,7 @@ def _property_change_trapped(window, prop, prop_type, format, mode, data):
error = gtk.gdk.error_trap_pop()
if error:
logging.debug('Received X Error (%i) while setting '
- 'a property on a window' % error)
+ 'a property on a window', error)
raise RuntimeError('Received X Error (%i) while setting '
'a property on a window' % error)
--
1.7.1
More information about the Sugar-devel
mailing list