From 12884fe696a4cd754f610e81bd14e322ae24b4a8 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Tue, 4 Feb 2025 15:33:56 +1100 Subject: [PATCH] feat: Default to debug mode off to stop reloads --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 2a86699..ae4d362 100644 --- a/main.py +++ b/main.py @@ -1,6 +1,7 @@ import io import json import random +import sys from flask import Flask, make_response, redirect, request, jsonify, render_template, send_from_directory,send_file import os import dotenv @@ -1474,7 +1475,6 @@ def plugin_function(ptype,plugin,function): return render_template("plugin-output.html", account=account,name=data['name'], description=data['description'],output=response) - else: return jsonify({"error": "Function not found"}) @@ -1609,4 +1609,8 @@ def page_not_found(e): #endregion if __name__ == '__main__': - app.run(debug=True,host='0.0.0.0') \ No newline at end of file + # Check to see if --debug is in the command line arguments + if "--debug" in sys.argv: + app.run(debug=True,host='0.0.0.0') + else: + app.run(host='0.0.0.0') \ No newline at end of file