diff options
author | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-09-20 16:22:08 +0000 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org> | 2009-09-20 16:22:08 +0000 |
commit | 8243a08d6d2121e4c1e92201c9d4361df42e5d8f (patch) | |
tree | 8885f3b3d554054901d15c7a77bad789a8aa12e8 /pym/portage/checksum.py | |
parent | Update syntax of numbers in some files which were missing in previous commit. (diff) | |
download | portage-8243a08d6d2121e4c1e92201c9d4361df42e5d8f.tar.gz portage-8243a08d6d2121e4c1e92201c9d4361df42e5d8f.tar.bz2 portage-8243a08d6d2121e4c1e92201c9d4361df42e5d8f.zip |
Update system imports for compatibility with Python 3.
svn path=/main/trunk/; revision=14294
Diffstat (limited to 'pym/portage/checksum.py')
-rw-r--r-- | pym/portage/checksum.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py index 01637b1a6..ee2e51c71 100644 --- a/pym/portage/checksum.py +++ b/pym/portage/checksum.py @@ -12,7 +12,10 @@ from portage import _unicode_encode import errno import stat import tempfile -import commands +try: + from subprocess import getstatusoutput as subprocess_getstatusoutput +except ImportError: + from commands import getstatusoutput as subprocess_getstatusoutput #dict of all available hash functions hashfunc_map = {} @@ -112,7 +115,7 @@ hashfunc_map["size"] = getsize prelink_capable = False if os.path.exists(PRELINK_BINARY): - results = commands.getstatusoutput(PRELINK_BINARY+" --version > /dev/null 2>&1") + results = subprocess_getstatusoutput(PRELINK_BINARY+" --version > /dev/null 2>&1") if (results[0] >> 8) == 0: prelink_capable=1 del results |