aboutsummaryrefslogtreecommitdiffstats
path: root/api.py
diff options
context:
space:
mode:
authorgenofire <geno+dev@fireorbit.de>2020-06-10 07:22:42 +0200
committergenofire <geno+dev@fireorbit.de>2020-06-10 07:24:35 +0200
commit38a7b171808c5a1525da5452b338fac0a9bf2c6b (patch)
tree45f64e59e4d433efb2a4b1d4172e6ad7fe341fee /api.py
parent893f68497de1ace6abfede0de4f70d11f6801a8b (diff)
add cleanup.py
Diffstat (limited to 'api.py')
-rw-r--r--api.py19
1 files changed, 0 insertions, 19 deletions
diff --git a/api.py b/api.py
index a83bae7..ab25f0a 100644
--- a/api.py
+++ b/api.py
@@ -29,25 +29,6 @@ class EjabberdApi:
return f"{self._login['user']}@{self._login['server']}", self._login['password']
return None
- @property
- def verstring(self):
- if self._login is not None:
- ver_str = re.compile('([1-9][0-9.]+(?![.a-z]))\\b')
- status = self.cmd('status', {})
-
- # matches
- try:
- tmp = ver_str.findall(status)[0]
- # raise SystemExit code 17 if no status message is received
- except TypeError:
- raise SystemExit(17)
-
- # return parsed version string
- logging.debug(f"fetch version: {tmp}")
- return version.parse(tmp)
-
- return None
-
def _rest(self, command: str, data) -> dict:
# add authentication header to the session obj
if self.session.auth is None: