From: "Zac Medico (zmedico)" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] portage r14053 - in main/trunk/pym/portage: . dbapi
Date: Fri, 14 Aug 2009 23:04:06 +0000 [thread overview]
Message-ID: <E1Mc5oc-0003vr-H6@stork.gentoo.org> (raw)
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:
reply other threads:[~2009-08-14 23:04 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1Mc5oc-0003vr-H6@stork.gentoo.org \
--to=zmedico@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox