diff --git a/server.py b/server.py index 8973111..8b569c1 100644 --- a/server.py +++ b/server.py @@ -36,16 +36,14 @@ def hello(): hex = hex.replace("#", "") str = "56" + hex + "00f0aa" - try: - result = subprocess.run( - [ - f"gatttool -i hci0 -b b2:3b:03:00:14:d6 --char-write-req -a 0x0009 -n {str}" - ], - stdout=subprocess.PIPE, - ).stdout.decode("utf-8") - if result != "Characteristic value was written successfully": - raise Exception("Didn't work") - else: - return request.query_string - except print(0): - pass + # try: + result = subprocess.run( + [f"gatttool -i hci0 -b b2:3b:03:00:14:d6 --char-write-req -a 0x0009 -n {str}"], + stdout=subprocess.PIPE, + ).stdout.decode("utf-8") + if result != "Characteristic value was written successfully": + raise Exception("Didn't work") + else: + return request.query_string + # except print(0): + # pass