aboutsummaryrefslogtreecommitdiffstats
path: root/aglbaseservice.py
diff options
context:
space:
mode:
authorEdi Feschiyan <edi.feschiyan@konsulko.com>2020-05-15 16:10:55 +0300
committerEdi Feschiyan <edi.feschiyan@konsulko.com>2020-06-09 09:30:04 +0300
commitd63eaf9c1ccb7f48c4855dcd09a19795102f9361 (patch)
treecf88d3f5ab3c0ee2908382f550af57036dae40f0 /aglbaseservice.py
parent6dccc504328e2de332bd8d86855bc8fda6da323d (diff)
touching regex matcher for sockets to stop giving warnings
Diffstat (limited to 'aglbaseservice.py')
-rw-r--r--aglbaseservice.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/aglbaseservice.py b/aglbaseservice.py
index e4fcfcd..7fc4655 100644
--- a/aglbaseservice.py
+++ b/aglbaseservice.py
@@ -14,8 +14,8 @@ import os
import re
from contextlib import asynccontextmanager
-logging.getLogger('AGLBaseService')
-logging.basicConfig(level=logging.DEBUG)
+# logging.getLogger('AGLBaseService')
+# logging.basicConfig(level=logging.DEBUG)
class AFBT(IntEnum):
REQUEST = 2,
@@ -88,7 +88,7 @@ class AGLBaseService:
exit(1)
URL = f'ws://{self.ip}:{self.port}/api?token={self.token}&uuid={self.uuid}'
- self._conn = connect(close_timeout=10000, uri=URL, subprotocols=['x-afb-ws-json1'], ping_interval=None)
+ self._conn = connect(close_timeout=0, uri=URL, subprotocols=['x-afb-ws-json1'], ping_timeout=None)
self.websocket = await self._conn.__aenter__()
return self
@@ -123,7 +123,7 @@ class AGLBaseService:
self.logger.debug(f'Service PID: {str(pid)}')
sockets = await c.run(f'find /proc/{pid}/fd/ | xargs readlink | grep socket')
- inodes = frozenset(re.findall('socket:\[(.*)\]', sockets.stdout))
+ inodes = frozenset(re.findall("socket:\\[(.*)\\]", sockets.stdout))
self.logger.debug(f"Socket inodes: {inodes}")
procnettcp = await c.run('cat /proc/net/tcp')