diff options
-rw-r--r-- | api.py | 6 | ||||
-rw-r--r-- | influx.py | 1 |
2 files changed, 4 insertions, 3 deletions
@@ -1,10 +1,10 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +import logging import re from packaging import version -import logging class EjabberdApi: """ @@ -32,12 +32,12 @@ class EjabberdApi: @property def verstring(self): if self._login is not None: - ver_str = re.compile('([1-9][0-9.]+)') + ver_str = re.compile('([1-9][0-9.]+(?![.a-z]))\\b') status = self.cmd('status', {}) # matches try: - tmp = ver_str.findall(status)[1] + tmp = ver_str.findall(status)[0] # raise SystemExit code 17 if no status message is received except TypeError: raise SystemExit(17) @@ -1,5 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +import logging import time from influxdb import InfluxDBClient |