From 6034b1210e2bda02095a157b55505ea652f67e3c Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 12 Jul 2011 16:20:45 -0700 Subject: Use portage.subprocess_getstatusoutput() more. --- pym/portage/checksum.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'pym/portage/checksum.py') 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 -- cgit v1.2.3-1-g7c22