Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
use_json = 'as-json' in args
throw = 'throw' in args
percent_autoformat = '%-autoformat' in args
if 'enable' in args:
log_helper.enable_logging(use_json, level, stream=sys.stdout)
_log()
if percent_autoformat:
logger.info('The %s is %d.', 'answer', 47)
if throw:
raise Exception('An exception occurred before ending the logging')
log_helper.end_logging()
text = ''
return_code = 1
try:
text = process_maybe_encrypted(
args.filepath, args.password,
field_filter_mode=args.field_filter_mode)
return_code = 0
except Exception as exc:
logger.exception(str(exc))
logger.print_str('DDE Links:')
for link in text.splitlines():
logger.print_str(text, type='dde-link')
log_helper.end_logging()
return return_code