* [gentoo-commits] portage r14109 - main/trunk/pym/portage/dbapi
@ 2009-08-21 1:47 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-08-21 1:47 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2009-08-21 01:47:21 +0000 (Fri, 21 Aug 2009)
New Revision: 14109
Modified:
main/trunk/pym/portage/dbapi/porttree.py
Log:
Use _encodings where appropriate.
Modified: main/trunk/pym/portage/dbapi/porttree.py
===================================================================
--- main/trunk/pym/portage/dbapi/porttree.py 2009-08-21 00:23:44 UTC (rev 14108)
+++ main/trunk/pym/portage/dbapi/porttree.py 2009-08-21 01:47:21 UTC (rev 14109)
@@ -26,8 +26,9 @@
from portage import eclass_cache, auxdbkeys, doebuild, flatten, \
listdir, dep_expand, eapi_is_supported, key_expand, dep_check, \
_eapi_is_deprecated
+from portage import os
+from portage import _encodings
from portage import _unicode_encode
-from portage import os
import codecs
import logging
@@ -172,8 +173,10 @@
repo_name_path = os.path.join(path, REPO_NAME_LOC)
try:
repo_name = codecs.open(
- _unicode_encode(repo_name_path), mode='r',
- encoding='utf_8', errors='replace').readline().strip()
+ _unicode_encode(repo_name_path,
+ encoding=_encodings['fs'], errors='strict'),
+ mode='r', encoding=_encodings['repo.content'],
+ 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
@@ -621,8 +624,10 @@
if eapi is None and \
'parse-eapi-ebuild-head' in self.doebuild_settings.features:
eapi = portage._parse_eapi_ebuild_head(codecs.open(
- _unicode_encode(myebuild), mode='r',
- encoding='utf_8', errors='replace'))
+ _unicode_encode(myebuild,
+ encoding=_encodings['fs'], errors='strict'),
+ mode='r', encoding=_encodings['repo.content'],
+ errors='replace'))
if eapi is not None:
self.doebuild_settings.configdict['pkg']['EAPI'] = eapi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-21 1:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-21 1:47 [gentoo-commits] portage r14109 - main/trunk/pym/portage/dbapi Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox