summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-07 21:03:11 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-07 21:03:11 +0000
commit2b188ad9574722d8102df3e0695002a508ee0c40 (patch)
treedf5b37f7278386178b860798192dc304f27d8bcc
parentIn config.__setitem__(), convert keys/values to unicode in order to avoid (diff)
downloadportage-2b188ad9574722d8102df3e0695002a508ee0c40.tar.gz
portage-2b188ad9574722d8102df3e0695002a508ee0c40.tar.bz2
portage-2b188ad9574722d8102df3e0695002a508ee0c40.zip
Open repo_name in text mode (unicode).
svn path=/main/trunk/; revision=13947
-rw-r--r--pym/portage/dbapi/porttree.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 9f427a148..9f36af569 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -167,7 +167,8 @@ class portdbapi(dbapi):
continue
repo_name_path = os.path.join(path, REPO_NAME_LOC)
try:
- repo_name = open(repo_name_path, 'r').readline().strip()
+ repo_name = codecs.open(repo_name_path, mode='r',
+ encoding='utf_8', errors='replace').readline().strip()
except EnvironmentError:
# warn about missing repo_name at some other time, since we
# don't want to see a warning every time the portage module is