From 3cce83c2e8960fdf1de6300a144cee5da055e8ea Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 12 Aug 2009 07:15:44 +0000 Subject: Use a single sys.hexversion conditional for both _unicode_func_wrapper() and _unicode_module_wrapper(). svn path=/main/trunk/; revision=14008 --- pym/portage/__init__.py | 2 ++ pym/portage/data.py | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index f4fb04890..9150e4054 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -178,6 +178,8 @@ class _unicode_module_wrapper(object): return result if sys.hexversion >= 0x3000000: + def _unicode_func_wrapper(func): + return func def _unicode_module_wrapper(mod): return mod diff --git a/pym/portage/data.py b/pym/portage/data.py index d87387bdc..5d5219be9 100644 --- a/pym/portage/data.py +++ b/pym/portage/data.py @@ -35,8 +35,7 @@ if not lchown: " exist. Please rebuild python.\n", noiselevel=-1) lchown() -if sys.hexversion < 0x3000000: - lchown = portage._unicode_func_wrapper(lchown) +lchown = portage._unicode_func_wrapper(lchown) def portage_group_warning(): warn_prefix = colorize("BAD", "*** WARNING *** ") -- cgit v1.2.3-1-g7c22