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 # convert data to json object
# we need to do some error handling in case of socket timeout # we need to do some error handling in case of socket timeout
try: try:
received_json = json.loads(data) received_json = json.loads(data)
print(received_json)
except: except:
pass received_json = bytes()
print(received_json)
# GET COMMANDS # GET COMMANDS
# "command" : "..." # "command" : "..."