mirror of
https://github.com/PotentiaRobotics/robot-gui.git
synced 2025-04-17 17:50:15 -04:00
if(invalid){don't send;}
This commit is contained in:
parent
5fe0a0ef59
commit
91b6386172
6
app.py
6
app.py
|
@ -20,7 +20,8 @@ def homepage():
|
|||
def sendData():
|
||||
|
||||
rot = request.form.get("rot")
|
||||
|
||||
try:
|
||||
rot = int(rot)
|
||||
print("Activated")
|
||||
import socket
|
||||
s=socket.socket()
|
||||
|
@ -33,7 +34,8 @@ def sendData():
|
|||
s.close()
|
||||
rece = "Confirm Sent: "+rece.decode("ASCII")
|
||||
return render_template("index.html", conf=rece)
|
||||
|
||||
except ValueError:
|
||||
return render_template("index.html", conf='Invalid Input "'+rot+'"')
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user