Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljoseph committed Jul 14, 2014
1 parent ada17f5 commit f576c02
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions changes/shell.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
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):
if not dry_run:
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)
Expand Down

0 comments on commit f576c02

Please sign in to comment.