diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2014-04-28 17:23:19 -0700 |
---|---|---|
committer | Thomas A Caswell <tcaswell@gmail.com> | 2015-09-29 15:12:41 -0400 |
commit | 750060dc0211cfb5786ba39da7283e5885eac7ad (patch) | |
tree | 28337e94a44554ecf2c8263a8068e303f814b0dc /giscanner/gdumpparser.py | |
parent | 06166e54cea2302bf9213f18881495eb2b5d089d (diff) | |
download | gobject-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/gdumpparser.py')
-rw-r--r-- | giscanner/gdumpparser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/giscanner/gdumpparser.py b/giscanner/gdumpparser.py index 7b154a8e..6fcf5896 100644 --- a/giscanner/gdumpparser.py +++ b/giscanner/gdumpparser.py @@ -300,7 +300,7 @@ blob containing data gleaned from GObject's primitive introspection.""" (ns, name) = self._transformer.split_csymbol(get_type) assert ns is self._namespace if name in ('get_type', '_get_gtype'): - message.fatal("""The GObject name %r isn't compatible + message.fatal("""The GObject name '%s' isn't compatible with the configured identifier prefixes: %r The class would have no name. Most likely you want to specify a @@ -353,7 +353,7 @@ different --identifier-prefix.""" % (xmlnode.attrib['name'], self._namespace.ide if isinstance(record, ast.Record): node.ctype = record.ctype else: - message.warn_node(node, "Couldn't find associated structure for '%r'" % (node.name, )) + message.warn_node(node, "Couldn't find associated structure for '%s'" % (node.name, )) # GtkFileChooserEmbed is an example of a private interface, we # just filter them out |