[RTOP-23] PR review fix

This commit is contained in:
lucasbutzke
2025-07-10 10:38:50 -04:00
parent fa3c3cd888
commit a8ddd94025
3 changed files with 6 additions and 3 deletions
+3
View File
@@ -33,8 +33,11 @@ webserver/core/glue_generator
webserver/core/openplc
webserver/iec2c
webserver/st_optimizer
webserver/active_program
utils/libmodbus_src/src/.libs/*
utils/libmodbus_src/tests/.libs/*
webserver/scripts/openplc_driver
webserver/scripts/openplc_platform
# Runtime directories
.venv
+2 -2
View File
@@ -32,7 +32,7 @@ def restapi_plc_get(command):
result = _handler_callback_get(command, data)
return jsonify(result), 200
except Exception as e:
print(f"Error in restapi_start_plc: {e}")
print(f"Error in restapi_plc_get: {e}")
return jsonify({"error": str(e)}), 500
@restapi_bp.route("/<command>", methods=["POST"])
@@ -47,5 +47,5 @@ def restapi_plc_post(command):
result = _handler_callback_post(command, data)
return jsonify(result), 200
except Exception as e:
print(f"Error in restapi_start_plc_post: {e}")
print(f"Error in restapi_plc_post: {e}")
return jsonify({"error": str(e)}), 500
+1 -1
View File
@@ -924,7 +924,7 @@ def upload_program():
if (prog_file.filename == ''):
return draw_blank_page() + "<h2>Error</h2><p>You need to select a file to be uploaded!<br><br>Use the back-arrow on your browser to return</p></div></div></div></body></html>"
# TODO colocar em outra funçao
# TODO realocate to another function
filename = str(random.randint(1,1000000)) + ".st"
prog_file.save(os.path.join('st_files', filename))