summaryrefslogtreecommitdiffstats
path: root/pym/portage/checksum.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-11 23:59:41 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-11 23:59:41 +0000
commit06e79f156c73c42393490ba385d5a8aa7c21b3af (patch)
tree321159a1fc24b534dc67cace9803f8a495b3d3e4 /pym/portage/checksum.py
parent3e5655473cbaf931d8f6bd42f49fb93e902fc59e (diff)
downloadportage-06e79f156c73c42393490ba385d5a8aa7c21b3af.tar.gz
portage-06e79f156c73c42393490ba385d5a8aa7c21b3af.tar.bz2
portage-06e79f156c73c42393490ba385d5a8aa7c21b3af.zip
Update imports to import portage.os (with unicode wrappers), and use
_unicode_encode() and _unicode_decode() where appropriate. svn path=/main/trunk/; revision=14004
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