summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-08-10 22:54:01 +0000
committerZac Medico <zmedico@gentoo.org>2009-08-10 22:54:01 +0000
commit450a4adc7201309037885fbd03a2661ffda4676b (patch)
treeaf183da210c901b7c019c829c6cafc3ab9e404d8 /pym
parentbcfea185d56a46495a01f650a6dbad59fb27e39c (diff)
downloadportage-450a4adc7201309037885fbd03a2661ffda4676b.tar.gz
portage-450a4adc7201309037885fbd03a2661ffda4676b.tar.bz2
portage-450a4adc7201309037885fbd03a2661ffda4676b.zip
Bug #280460 - Wrap portage.os with unicode encode/decode wrappers.
svn path=/main/trunk/; revision=13989
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/__init__.py2
-rw-r--r--pym/portage/dbapi/vartree.py4
2 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py
index 358de52b7..8d09333d6 100644
--- a/pym/portage/__init__.py
+++ b/pym/portage/__init__.py
@@ -188,6 +188,8 @@ if sys.hexversion >= 0x3000000:
def _unicode_module_wrapper(mod):
return mod
+os = _unicode_module_wrapper(os)
+
def _shell_quote(s):
"""
Quote a string in double-quotes and use backslashes to
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 6109c81b4..f89d6793e 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -39,12 +39,12 @@ from portage import listdir, dep_expand, digraph, flatten, key_expand, \
from portage.cache.mappings import slot_dict_class
import codecs
-import os, re, shutil, stat, errno, copy, subprocess
+import re, shutil, stat, errno, copy, subprocess
import logging
import sys
from itertools import izip
-os = _unicode_module_wrapper(os)
+os = portage.os
try:
import cPickle as pickle