ver Jan14th
setup method for Thunderbird composing tasks
This commit is contained in:
@@ -61,11 +61,12 @@ def execute_command():
|
||||
@app.route('/setup/launch', methods=["POST"])
|
||||
def launch_app():
|
||||
data = request.json
|
||||
command: List[str] = data.get("command", [])
|
||||
shell = data.get("shell", False)
|
||||
command: List[str] = data.get("command", "" if shell else [])
|
||||
|
||||
try:
|
||||
subprocess.Popen(command)
|
||||
return "{:} launched successfully".format(" ".join(command))
|
||||
subprocess.Popen(command, shell=shell)
|
||||
return "{:} launched successfully".format(command if shell else " ".join(command))
|
||||
except Exception as e:
|
||||
return jsonify({"status": "error", "message": str(e)}), 500
|
||||
|
||||
|
||||
Reference in New Issue
Block a user