From 268de910a8e459125c12c6f7eaab1a59d59c2a0e Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 11 Aug 2009 22:05:11 +0000 Subject: Wrap portage.data.lchown() for unicode support in python-2.x. svn path=/main/trunk/; revision=14001 --- pym/portage/__init__.py | 5 +++-- pym/portage/data.py | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'pym') diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index c15366d93..2325297b4 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -61,6 +61,9 @@ try: 'portage.checksum', 'portage.checksum:perform_checksum,perform_md5,prelink_capable', 'portage.cvstree', + 'portage.data', + 'portage.data:lchown,ostype,portage_gid,portage_uid,secpass,' + \ + 'uid,userland,userpriv_groups,wheelgid', 'portage.dep', 'portage.dep:best_match_to_list,dep_getcpv,dep_getkey,' + \ 'get_operator,isjustname,isspecific,isvalidatom,' + \ @@ -101,8 +104,6 @@ try: INVALID_ENV_FILE, CUSTOM_MIRRORS_FILE, CONFIG_MEMORY_FILE,\ INCREMENTALS, EAPI, MISC_SH_BINARY, REPO_NAME_LOC, REPO_NAME_FILE - from portage.data import ostype, lchown, userland, secpass, uid, wheelgid, \ - portage_uid, portage_gid, userpriv_groups from portage.manifest import Manifest import portage.exception from portage.localization import _ diff --git a/pym/portage/data.py b/pym/portage/data.py index 3ae286b34..d87387bdc 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -35,6 +35,9 @@ if not lchown: " exist. Please rebuild python.\n", noiselevel=-1) lchown() +if sys.hexversion < 0x3000000: + lchown = portage._unicode_func_wrapper(lchown) + def portage_group_warning(): warn_prefix = colorize("BAD", "*** WARNING *** ") mylines = [ -- cgit v1.2.3-1-g7c22