From f576c0271d63623c8dafc609cc6549e4dc697add Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Mon, 14 Jul 2014 11:25:20 +0200 Subject: [PATCH] Fix tests --- changes/shell.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/changes/shell.py b/changes/shell.py index acd1412..1cfc579 100644 --- a/changes/shell.py +++ b/changes/shell.py @@ -6,12 +6,12 @@ log = logging.getLogger(__name__) -def handle_dry_run(function, *args): +def handle_dry_run(fn, *args): if not config.arguments.get('--dry-run', True): - return function(*args) + return fn(*args) else: - log.debug('dry run of %s %s, skipping' % (function, args)) - return True + log.debug('dry run of %s %s, skipping' % (fn, args)) + return True def execute(command, dry_run=True): @@ -19,7 +19,7 @@ def execute(command, dry_run=True): try: return check_output(command.split(' ')).split('\n') except CalledProcessError as e: - log.debug('return code: %s, output: %s', e.returncode, e.output) + log.error('return code: %s, output: %s', e.returncode, e.output) return False else: log.debug('dry run of %s, skipping' % command)