From 450a4adc7201309037885fbd03a2661ffda4676b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 10 Aug 2009 22:54:01 +0000 Subject: Bug #280460 - Wrap portage.os with unicode encode/decode wrappers. svn path=/main/trunk/; revision=13989 --- pym/portage/__init__.py | 2 ++ pym/portage/dbapi/vartree.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'pym') 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 -- cgit v1.2.3-1-g7c22