diff options
author | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-04-25 00:22:59 +0200 |
---|---|---|
committer | Dieter Verfaillie <dieterv@optionexplicit.be> | 2013-05-07 15:36:09 +0200 |
commit | bb482abafe4bc6d88cbbc4abc36967a3012e9f50 (patch) | |
tree | e5943af0d2163322c947c328fe0e6f2b627bb30b | |
parent | 0dbd46680a7fac7ac74c2945e23b95dd04ff79dc (diff) | |
download | gobject-introspection-bb482abafe4bc6d88cbbc4abc36967a3012e9f50.tar.gz |
giscanner: remove unneeded encode('utf-8').decode('utf-8') roundtrip
line is a unicode() instance, xml.sax.saxutils.escape() does
nothing more than call a couple of replace() methods on said
unicode() instance so it makes little sense to encode line
into a str() and decode the escaped result back into a unicode().
https://bugzilla.gnome.org/show_bug.cgi?id=699533
-rwxr-xr-x | giscanner/xmlwriter.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/giscanner/xmlwriter.py b/giscanner/xmlwriter.py index 11f84859..4a1dc9fb 100755 --- a/giscanner/xmlwriter.py +++ b/giscanner/xmlwriter.py @@ -135,7 +135,7 @@ class XMLWriter(object): line = line.decode('utf-8') assert isinstance(line, unicode) if do_escape: - line = escape(line.encode('utf-8')).decode('utf-8') + line = escape(line) if indent: self._data.write('%s%s%s' % ( self._indent_char * self._indent, |