def _log_or_execute(content, func, *args, **kwargs):
 subject = kwargs.get('subject', func.__name__)
 if DRY_RUN:
  logging.info('Would %s: %s', subject, content)
 else:
  func(*args)

def _log_or_execute ( content , func , * args , ** kwargs ) : subject = kwargs . get ( 'subject' , func . __name__ ) if DRY_RUN : logging . info ( 'Would %s: %s' , subject , content ) else : func ( * args )
log a message if dry_run is enabled .