[Pkg-sugar-commit] [sugar-toolkit] 06/21: pylint cleanup: pass format parameters to log functions instead of using %

Jonas Smedegaard dr at jones.dk
Thu Apr 16 18:50:24 UTC 2015


This is an automated email from the git hooks/post-receive script.

js pushed a commit to annotated tag debian/0.84.17-1
in repository sugar-toolkit.

commit c63c4f28ae8730e9ec1f5a4446c8c69c3c3f66e2
Author: Sascha Silbe <sascha-pgp at silbe.org>
Date:   Fri Oct 15 19:59:41 2010 +0000

    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 at laptop.org>
    Acked-by: Simon Schampijer <simon at laptop.org>
    CC: Aleksey Lim <alsroot at member.fsf.org>
---
 src/sugar/wm.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sugar/wm.py b/src/sugar/wm.py
index cd8f200..2a3300e 100644
--- a/src/sugar/wm.py
+++ b/src/sugar/wm.py
@@ -31,7 +31,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
 
@@ -43,7 +43,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)
     

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-sugar/sugar-toolkit.git



More information about the pkg-sugar-commit mailing list