diff options
-rw-r--r-- | pym/portage/checksum.py | 8 | ||||
-rw-r--r-- | pym/portage/eclass_cache.py | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py index 56719a1df..501ae3e6a 100644 --- a/pym/portage/checksum.py +++ b/pym/portage/checksum.py @@ -3,13 +3,13 @@ # Distributed under the terms of the GNU General Public License v2 # $Id$ +import portage from portage.const import PRIVATE_PATH,PRELINK_BINARY,HASHING_BLOCKSIZE -import os +from portage import os +from portage import _unicode_encode import errno import stat import tempfile -import portage.exception -import portage.process import commands #dict of all available hash functions @@ -25,7 +25,7 @@ def _generate_hash_function(hashtype, hashobject, origin="unknown"): @type filename: String @return: The hash and size of the data """ - f = open(filename, 'rb') + f = open(_unicode_encode(filename), 'rb') blocksize = HASHING_BLOCKSIZE data = f.read(blocksize) size = 0L diff --git a/pym/portage/eclass_cache.py b/pym/portage/eclass_cache.py index 8f80ec53e..3f86a6d69 100644 --- a/pym/portage/eclass_cache.py +++ b/pym/portage/eclass_cache.py @@ -6,10 +6,10 @@ __all__ = ["cache"] import warnings -from portage.util import normalize_path, writemsg -import errno, os, sys -from portage.data import portage_gid +from portage.util import normalize_path +import errno from portage.exception import PermissionDenied +from portage import os class cache(object): """ |