From 28115d7d72cf0f0c42c636039ed2a08ee2412dd3 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sat, 15 Oct 2011 22:58:56 -0700 Subject: [PATCH] _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. --- pym/portage/dbapi/porttree.py | 5 +---- 1 file changed, 1 insertion(+), 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 -- 2.26.2