From b73b60991cd6eeddf5bf4144e3e5741003c6c6a4 Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Tue, 10 Aug 2010 13:48:38 -0700 Subject: Fix the prep command to use _run_command Get realtime output! --- src/pyfedpkg/__init__.py | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'src/pyfedpkg/__init__.py') diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index eca82b2..a95ab92 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -1371,7 +1371,7 @@ class PackageModule: optionally for a specific arch - Logs the output and returns the returncode from the prep call + Logs the output and returns nothing """ @@ -1383,18 +1383,9 @@ class PackageModule: if arch: cmd.extend(['--target', arch]) cmd.extend(['--nodeps', '-bp', os.path.join(self.path, self.spec)]) - # Run the command and capture output - log.debug('Running: %s' % ' '.join(cmd)) - try: - proc = subprocess.Popen(' '.join(cmd), stderr=subprocess.PIPE, - stdout=subprocess.PIPE, shell=True) - output, error = proc.communicate() - except OSError, e: - raise FedpkgError(e) - log.info(output) - if error: - log.error(error) - return proc.returncode + # Run the command + _run_command(cmd, shell=True) + return def push(self): """Push changes to the main repository""" -- cgit