diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-10-28 17:12:11 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-10-28 17:12:11 -0700 |
commit | a828ef4cb5ee60e448a95bb746a55fb476b1c575 (patch) | |
tree | d9832e8bfae8c266da28d72e665f5d3c165e52f3 /bin/xpak-helper.py | |
parent | 967bc855b7e4db529afbe8b7bf7f8ed7ea55858a (diff) | |
download | portage-a828ef4cb5ee60e448a95bb746a55fb476b1c575.tar.gz portage-a828ef4cb5ee60e448a95bb746a55fb476b1c575.tar.bz2 portage-a828ef4cb5ee60e448a95bb746a55fb476b1c575.zip |
Use bytes instead of unicode with isinstance.
This is preferred since the bytes type is available in all supported
python versions, while the unicode type is only available in python2.
Diffstat (limited to 'bin/xpak-helper.py')
-rwxr-xr-x | bin/xpak-helper.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/xpak-helper.py b/bin/xpak-helper.py index 4766d990d..ef74920db 100755 --- a/bin/xpak-helper.py +++ b/bin/xpak-helper.py @@ -1,5 +1,5 @@ #!/usr/bin/python -# Copyright 2009 Gentoo Foundation +# Copyright 2009-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import optparse @@ -36,7 +36,7 @@ def command_recompose(args): def main(argv): - if argv and sys.hexversion < 0x3000000 and not isinstance(argv[0], unicode): + if argv and isinstance(argv[0], bytes): for i, x in enumerate(argv): argv[i] = portage._unicode_decode(x, errors='strict') |