summaryrefslogtreecommitdiffstats
path: root/pym/portage/checksum.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/checksum.py')
-rw-r--r--pym/portage/checksum.py8
1 files changed, 4 insertions, 4 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