aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-07-12 16:20:45 -0700
committerZac Medico <zmedico@gentoo.org>2011-07-12 16:20:45 -0700
commit6034b1210e2bda02095a157b55505ea652f67e3c (patch)
tree3dccbef1e01e68fce72f76fcd7dd8be38bdc6268 /pym/portage/checksum.py
parentAvoid baseline subprocess import under python2. (diff)
downloadportage-6034b1210e2bda02095a157b55505ea652f67e3c.tar.gz
portage-6034b1210e2bda02095a157b55505ea652f67e3c.tar.bz2
portage-6034b1210e2bda02095a157b55505ea652f67e3c.zip
Use portage.subprocess_getstatusoutput() more.
Diffstat (limited to 'pym/portage/checksum.py')
-rw-r--r--pym/portage/checksum.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/pym/portage/checksum.py b/pym/portage/checksum.py
index eeb5995bb..9e7e455d1 100644
--- a/pym/portage/checksum.py
+++ b/pym/portage/checksum.py
@@ -1,5 +1,5 @@
# checksum.py -- core Portage functionality
-# Copyright 1998-2010 Gentoo Foundation
+# Copyright 1998-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import portage
@@ -11,10 +11,6 @@ from portage import _unicode_encode
import errno
import stat
import tempfile
-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 = {}
@@ -125,7 +121,8 @@ hashfunc_map["size"] = getsize
prelink_capable = False
if os.path.exists(PRELINK_BINARY):
- results = subprocess_getstatusoutput(PRELINK_BINARY+" --version > /dev/null 2>&1")
+ results = portage.subprocess_getstatusoutput(
+ "%s --version > /dev/null 2>&1" % (PRELINK_BINARY,))
if (results[0] >> 8) == 0:
prelink_capable=1
del results