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)