summaryrefslogtreecommitdiffstats
path: root/pym/portage/xml
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2013-01-18 13:33:08 -0800
committerZac Medico <zmedico@gentoo.org>2013-01-18 13:36:47 -0800
commit71235479ab208318dff391420f9695f5cfaa9594 (patch)
treed36bc22802e3b13c8ca5dce4328540a287c6eb3f /pym/portage/xml
parent0d732def5d30b29ab2941f0c66919a3ec4e8eb02 (diff)
downloadportage-71235479ab208318dff391420f9695f5cfaa9594.tar.gz
portage-71235479ab208318dff391420f9695f5cfaa9594.tar.bz2
portage-71235479ab208318dff391420f9695f5cfaa9594.zip
Use unicode_literals more.
This helps to ensure consistent results, regardless of whether we're using Python 2 or Python 3.
Diffstat (limited to 'pym/portage/xml')
-rw-r--r--pym/portage/xml/metadata.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pym/portage/xml/metadata.py b/pym/portage/xml/metadata.py
index 113b118a4..fcd9dc0e3 100644
--- a/pym/portage/xml/metadata.py
+++ b/pym/portage/xml/metadata.py
@@ -1,4 +1,4 @@
-# Copyright 2010-2012 Gentoo Foundation
+# Copyright 2010-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
"""Provides an easy-to-use python interface to Gentoo's metadata.xml file.
@@ -28,6 +28,8 @@
'Thomas Mills Hinkle'
"""
+from __future__ import unicode_literals
+
__all__ = ('MetaDataXML',)
import sys
@@ -58,7 +60,7 @@ except (ImportError, SystemError, RuntimeError, Exception):
import re
import xml.etree.ElementTree
-from portage import _encodings, _unicode_encode, _unicode_decode
+from portage import _encodings, _unicode_encode
from portage.util import unique_everseen
class _MetadataTreeBuilder(xml.etree.ElementTree.TreeBuilder):
@@ -208,7 +210,7 @@ class MetaDataXML(object):
except ImportError:
pass
except ExpatError as e:
- raise SyntaxError(_unicode_decode("%s") % (e,))
+ raise SyntaxError("%s" % (e,))
if isinstance(herds, etree.ElementTree):
herds_etree = herds