Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def terms():
return render_template("terms.html",
disclaimer=DISCLAIMER,
accepted_terms=accepted_terms())
def commands(cmd=None):
if cmd == "restart":
restart_bot()
return jsonify("Success")
elif cmd == "stop":
stop_bot()
return jsonify("Success")
return render_template('commands.html',
cmd=cmd,
metrics_enabled=get_metrics_enabled(),
disclaimer=DISCLAIMER)
def _log_terms_if_unaccepted(config, logger):
if not accepted_terms(config):
logger.info("*** Disclaimer ***")
for line in DISCLAIMER:
logger.info(line)
logger.info("... Disclaimer ...")
else:
logger.info("Disclaimer accepted by user.")