public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r14004 - main/trunk/pym/portage
@ 2009-08-11 23:59 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-08-11 23:59 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2009-08-11 23:59:41 +0000 (Tue, 11 Aug 2009)
New Revision: 14004

Modified:
   main/trunk/pym/portage/checksum.py
   main/trunk/pym/portage/eclass_cache.py
Log:
Update imports to import portage.os (with unicode wrappers), and use
_unicode_encode() and _unicode_decode() where appropriate.


Modified: main/trunk/pym/portage/checksum.py
===================================================================
--- main/trunk/pym/portage/checksum.py	2009-08-11 23:43:10 UTC (rev 14003)
+++ main/trunk/pym/portage/checksum.py	2009-08-11 23:59:41 UTC (rev 14004)
@@ -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 @@
 		@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

Modified: main/trunk/pym/portage/eclass_cache.py
===================================================================
--- main/trunk/pym/portage/eclass_cache.py	2009-08-11 23:43:10 UTC (rev 14003)
+++ main/trunk/pym/portage/eclass_cache.py	2009-08-11 23:59:41 UTC (rev 14004)
@@ -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):
 	"""




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-11 23:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-11 23:59 [gentoo-commits] portage r14004 - main/trunk/pym/portage Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox