diff options
author | genofire <geno+dev@fireorbit.de> | 2020-06-10 07:22:42 +0200 |
---|---|---|
committer | genofire <geno+dev@fireorbit.de> | 2020-06-10 07:24:35 +0200 |
commit | 38a7b171808c5a1525da5452b338fac0a9bf2c6b (patch) | |
tree | 45f64e59e4d433efb2a4b1d4172e6ad7fe341fee /api.py | |
parent | 893f68497de1ace6abfede0de4f70d11f6801a8b (diff) |
add cleanup.py
Diffstat (limited to 'api.py')
-rw-r--r-- | api.py | 19 |
1 files changed, 0 insertions, 19 deletions
@@ -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: |