This commit is contained in:
dadav
2020-04-18 00:02:25 +02:00
parent 0b5a63a3d8
commit 6038f555fa
2 changed files with 13 additions and 18 deletions

View File

@ -47,6 +47,8 @@ class Client(object):
logging.debug("Error while parsing event (%s)", ex)
except websockets.exceptions.ConnectionClosedError:
logging.debug("Lost websocket connection. Reconnecting...")
except websockets.exceptions.WebSocketException as wex:
logging.debug("Websocket exception (%s)", wex)
def run(self, command, verbose_errors=True):
r = requests.post("%s/session" % self.url, auth=self.auth, json={'cmd': command})