From 411e3abeddb3a3d232b07baf9dfa499269f7002e Mon Sep 17 00:00:00 2001 From: Jesse Keating Date: Wed, 11 Aug 2010 17:58:04 -0700 Subject: Make clean use the _run_command --- src/pyfedpkg/__init__.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index a95ab92..a811707 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -282,7 +282,7 @@ def clean(dry=False, useignore=True): Can optionally not use the ignore rules - Logs output and returns the returncode + Logs output and returns nothing """ @@ -293,17 +293,8 @@ def clean(dry=False, useignore=True): if not useignore: cmd.append('-x') # Run it! - log.debug('Running: %s' % subprocess.list2cmdline(cmd)) - try: - proc = subprocess.Popen(cmd, stderr=subprocess.PIPE, - stdout=subprocess.PIPE) - output, error = proc.communicate() - except OSError, e: - raise FedpkgError(e) - log.info(output) - if error: - log.error(error) - return proc.returncode + _run_command(cmd) + return def clone(module, user, path=os.getcwd(), branch=None, bare_dir=None): """Clone a repo, optionally check out a specific branch. -- cgit