summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-10-15 22:58:56 -0700
committerZac Medico <zmedico@gentoo.org>2011-10-15 22:58:56 -0700
commit28115d7d72cf0f0c42c636039ed2a08ee2412dd3 (patch)
tree9c3d4bca01a662f8dc4c4e0f49f0f1759a501d80
parentc670edc7b035fdce9d45df9d4e63d6afddba115c (diff)
downloadportage-28115d7d72cf0f0c42c636039ed2a08ee2412dd3.tar.gz
portage-28115d7d72cf0f0c42c636039ed2a08ee2412dd3.tar.bz2
portage-28115d7d72cf0f0c42c636039ed2a08ee2412dd3.zip
_pull_valid_cache: pass unicode to hashed_path
This removes a conversion to bytes that should have been removed in commit 2ed1cb53cc4158af08c22d466b15b9a9a7767212. The hashed_path location attribute should always be unicode, for consistency will path handling throughout portage. The hashed_path class internally uses the portage portage.os wrapper to ensure that paths are encoded as utf_8 bytes when they are passed to the real os module for stat calls.
-rw-r--r--pym/portage/dbapi/porttree.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index a1308a7e7..13c27e979 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -420,10 +420,7 @@ class portdbapi(dbapi):
def _pull_valid_cache(self, cpv, ebuild_path, repo_path):
try:
- # Don't use unicode-wrapped os module, for better performance.
- path = _unicode_encode(ebuild_path,
- encoding=_encodings['fs'], errors='strict')
- ebuild_hash = eclass_cache.hashed_path(path)
+ ebuild_hash = eclass_cache.hashed_path(ebuild_path)
# snag mtime since we use it later, and to trigger stat failure
# if it doesn't exist
ebuild_hash.mtime