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 <quozl@laptop.org> Acked-by: Simon Schampijer <simon@laptop.org> CC: Aleksey Lim <alsroot@member.fsf.org>
This commit is contained in:
parent
ff16cb0fa9
commit
adba508d8f
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user