pylint cleanup: pass format parameters to log functions instead of using %

This avoids the overhead from the string formatting on production systems.

Reviewed-by: James Cameron <[email protected]>
Acked-by: Simon Schampijer <[email protected]>
CC: Aleksey Lim <[email protected]>
This commit is contained in:
Sascha Silbe
2010-11-23 17:14:35 +01:00
parent ff16cb0fa9
commit adba508d8f
+2 -2
View File
@@ -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)