better error handling

This commit is contained in:
DJ2LS 2021-05-29 15:59:06 +02:00 committed by GitHub
parent 37146b3081
commit 69b0ba4c5c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -45,11 +45,13 @@ class CMDTCPRequestHandler(socketserver.BaseRequestHandler):
# convert data to json object
# we need to do some error handling in case of socket timeout
try:
received_json = json.loads(data)
print(received_json)
except:
pass
print(received_json)
received_json = bytes()
# GET COMMANDS
# "command" : "..."