summaryrefslogtreecommitdiff
path: root/misc
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 /misc
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 'misc')
-rwxr-xr-xmisc/update-glib-annotations.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/misc/update-glib-annotations.py b/misc/update-glib-annotations.py
index f523f926..200a02a7 100755
--- a/misc/update-glib-annotations.py
+++ b/misc/update-glib-annotations.py
@@ -68,7 +68,7 @@ if __name__ == '__main__':
else:
builddir = srcdir
- print("Using source directory: %r build directory: %r" % (srcdir, builddir))
+ print("Using source directory: '%s' build directory: '%s'" % (srcdir, builddir))
modules = [{'name': 'glib',
'srcname': '../gir/glib-2.0.c',
@@ -105,6 +105,6 @@ if __name__ == '__main__':
srcfile.close()
os.rename(tmpname, srcname)
- print("Updated %r" % (srcname, ))
+ print("Updated '%s'" % (srcname, ))
print("Done; run \"git diff\" to see any changes.")