def convert(filename, debug): check_update_available() if debug: LOGGER.setLevel(logging.DEBUG) try: click.echo(convert_file(filename)) except Exception as e: LOGGER.error("Error converting {0}:".format(filename)) LOGGER.exception(e) sys.exit(1)
def convert(template_file, debug, confirm): if not confirm: check_update_available() if debug: LOGGER.setLevel(logging.DEBUG) try: click.echo(convert_file(template_file)) except Exception as e: LOGGER.error("Error converting {0}:".format(template_file)) LOGGER.exception(e) sys.exit(1)
def convert(template_file, debug, confirm, yes): confirm = confirm or yes if not confirm: check_update_available() if debug: LOGGER.setLevel(logging.DEBUG) try: click.echo(convert_file(template_file)) except Exception as e: LOGGER.error("Error converting {0}:".format(template_file)) LOGGER.exception(e) sys.exit(1)