summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--pym/portage/checksum.py8
-rw-r--r--pym/portage/eclass_cache.py6
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):
"""