summaryrefslogtreecommitdiffstats
path: root/pym/repoman/herdbase.py
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/repoman/herdbase.py
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/repoman/herdbase.py')
-rw-r--r--pym/repoman/herdbase.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/repoman/herdbase.py b/pym/repoman/herdbase.py
index 4c420d0ec..c5b88ff17 100644
--- a/pym/repoman/herdbase.py
+++ b/pym/repoman/herdbase.py
@@ -1,8 +1,10 @@
# -*- coding: utf-8 -*-
# repoman: Herd database analysis
-# Copyright 2010-2012 Gentoo Foundation
+# Copyright 2010-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2 or later
+from __future__ import unicode_literals
+
import errno
import xml.etree.ElementTree
try:
@@ -63,7 +65,7 @@ def make_herd_base(filename):
parser=xml.etree.ElementTree.XMLParser(
target=_HerdsTreeBuilder()))
except ExpatError as e:
- raise ParseError("metadata.xml: " + str(e))
+ raise ParseError("metadata.xml: %s" % (e,))
except EnvironmentError as e:
func_call = "open('%s')" % filename
if e.errno == errno.EACCES: