summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/lock-helper.py4
-rwxr-xr-xbin/portageq2
-rw-r--r--pym/_emerge/main.py3
3 files changed, 4 insertions, 5 deletions
diff --git a/bin/lock-helper.py b/bin/lock-helper.py
index 5f3ea9f09..065ddcbc4 100755
--- a/bin/lock-helper.py
+++ b/bin/lock-helper.py
@@ -1,5 +1,5 @@
#!/usr/bin/python
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import os
@@ -9,7 +9,7 @@ import portage
def main(args):
- if args and sys.hexversion < 0x3000000 and not isinstance(args[0], unicode):
+ if args and isinstance(args[0], bytes):
for i, x in enumerate(args):
args[i] = portage._unicode_decode(x, errors='strict')
diff --git a/bin/portageq b/bin/portageq
index 02f19040c..40cc21d27 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -847,7 +847,7 @@ def main():
os.environ["ROOT"] = root
args = sys.argv[2:]
- if args and sys.hexversion < 0x3000000 and not isinstance(args[0], unicode):
+ if args and isinstance(args[0], bytes):
for i in range(len(args)):
args[i] = portage._unicode_decode(args[i])
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 0dfc5f998..162f70ffd 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -1233,8 +1233,7 @@ def parse_opts(tmpcmdline, silent=False):
if myaction is None and myoptions.deselect is True:
myaction = 'deselect'
- if myargs and sys.hexversion < 0x3000000 and \
- not isinstance(myargs[0], unicode):
+ if myargs and isinstance(myargs[0], bytes):
for i in range(len(myargs)):
myargs[i] = portage._unicode_decode(myargs[i])