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

Author: zmedico
Date: 2009-08-14 23:04:05 +0000 (Fri, 14 Aug 2009)
New Revision: 14053

Modified:
   main/trunk/pym/portage/__init__.py
   main/trunk/pym/portage/dbapi/vartree.py
Log:
Use portage._fs_encoding where applicable.


Modified: main/trunk/pym/portage/__init__.py
===================================================================
--- main/trunk/pym/portage/__init__.py	2009-08-14 22:57:44 UTC (rev 14052)
+++ main/trunk/pym/portage/__init__.py	2009-08-14 23:04:05 UTC (rev 14053)
@@ -209,12 +209,13 @@
 	id(_os.system)        : _os.system,
 }
 
-os = _unicode_module_wrapper(_os, overrides=_os_overrides)
+os = _unicode_module_wrapper(_os, overrides=_os_overrides,
+	encoding=_fs_encoding)
 _os_merge = _unicode_module_wrapper(_os,
 	encoding=_merge_encoding, overrides=_os_overrides)
 
 import shutil as _shutil
-shutil = _unicode_module_wrapper(_shutil)
+shutil = _unicode_module_wrapper(_shutil, encoding=_fs_encoding)
 
 # Imports below this point rely on the above unicode wrapper definitions.
 _selinux = None
@@ -222,7 +223,7 @@
 _selinux_merge = _unicode_module_wrapper(_selinux, encoding=_merge_encoding)
 try:
 	import portage._selinux
-	selinux = _unicode_module_wrapper(_selinux)
+	selinux = _unicode_module_wrapper(_selinux, encoding=_fs_encoding)
 except OSError, e:
 	sys.stderr.write("!!! SELinux not loaded: %s\n" % str(e))
 	del e
@@ -7111,7 +7112,7 @@
 			"mv '%s' '%s'" % (src, dest))
 
 def movefile(src, dest, newmtime=None, sstat=None, mysettings=None,
-		hardlink_candidates=None, encoding='utf_8'):
+		hardlink_candidates=None, encoding=_fs_encoding):
 	"""moves a file from src to dest, preserving all permissions and attributes; mtime will
 	be preserved even when moving across filesystems.  Returns true on success and false on
 	failure.  Move is atomic."""

Modified: main/trunk/pym/portage/dbapi/vartree.py
===================================================================
--- main/trunk/pym/portage/dbapi/vartree.py	2009-08-14 22:57:44 UTC (rev 14052)
+++ main/trunk/pym/portage/dbapi/vartree.py	2009-08-14 23:04:05 UTC (rev 14053)
@@ -37,6 +37,7 @@
 
 # This is a special version of the os module, wrapped for unicode support.
 from portage import os
+from portage import _fs_encoding
 from portage import _merge_encoding
 from portage import _os_merge
 from portage import _selinux_merge
@@ -2385,7 +2386,7 @@
 						# different value of sys.getfilesystemencoding(),
 						# so fall back to utf_8 if appropriate.
 						try:
-							_unicode_encode(obj, encoding='utf_8', errors='strict')
+							_unicode_encode(obj, encoding=_fs_encoding, errors='strict')
 						except UnicodeEncodeError:
 							pass
 						else:




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

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

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-14 23:04 [gentoo-commits] portage r14053 - in main/trunk/pym/portage: . dbapi 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