summaryrefslogtreecommitdiff
path: root/giscanner/message.py
diff options
context:
space:
mode:
authorSimon Feltman <sfeltman@src.gnome.org>2014-04-28 17:23:19 -0700
committerThomas A Caswell <tcaswell@gmail.com>2015-09-29 15:12:41 -0400
commit750060dc0211cfb5786ba39da7283e5885eac7ad (patch)
tree28337e94a44554ecf2c8263a8068e303f814b0dc /giscanner/message.py
parent06166e54cea2302bf9213f18881495eb2b5d089d (diff)
downloadgobject-introspection-750060dc0211cfb5786ba39da7283e5885eac7ad.tar.gz
giscanner: Replace repr format usage with string formatter
Replace occurances of "%r" (repr) in format strings where the intended behaviour is to output a quoted string "'foo'" with explicit usage of "'%s'". This is needed to move the codebase to unicode literals in order to upgrade to Python 3. Python 2 unicode strings are expanded with repr formatting prefixed with a "u" as in "u'foo'" which causes failures for various text formatting scenarios. https://bugzilla.gnome.org/show_bug.cgi?id=679438
Diffstat (limited to 'giscanner/message.py')
-rw-r--r--giscanner/message.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/message.py b/giscanner/message.py
index b4321072..96cf455a 100644
--- a/giscanner/message.py
+++ b/giscanner/message.py
@@ -178,7 +178,7 @@ class MessageLogger(object):
def log_symbol(self, log_type, symbol, text):
"""Log a warning in the context of the given symbol."""
self.log(log_type, text, symbol.position,
- prefix="symbol=%r" % (symbol.ident, ))
+ prefix="symbol='%s'" % (symbol.ident, ))
def log_node(log_type, node, text, context=None, positions=None):