diff options
author | nico <nico@magicbroccoli.de> | 2020-06-29 18:59:16 +0200 |
---|---|---|
committer | nico <nico@magicbroccoli.de> | 2020-06-29 18:59:16 +0200 |
commit | 044e0334d2bfb9c4b076afc562e4fb3d17c7db20 (patch) | |
tree | 73137b27409b00a45c76c2bfbf4b5e9d029a4ff1 /cleanup.py | |
parent | 5f0cb289c1d91513427ffdc8f646bc86516c2759 (diff) |
flake8 fixup
* fix trailing/ leading whitespaces
* fix None comparison to use is
+ add noqa ignore statements for the influx escape replacements
+ add noqa ignore statements around the bare excepts
TODO: This is only a temporary fix for most of the bare excepts, we need further specify those.
Diffstat (limited to 'cleanup.py')
-rwxr-xr-x | cleanup.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -38,13 +38,13 @@ class EjabberdCleanup(EjabberdApiCalls): lastdate = None try: lastdate = datetime.datetime.strptime(last_stamp, "%Y-%m-%dT%H:%M:%SZ") - except: + except: # noqa: E722 try: lastdate = datetime.datetime.strptime(last_stamp, "%Y-%m-%dT%H:%M:%S.%fZ") - except: + except: # noqa: E722 logging.error(f"{user}@{host}: not able to parse '{last_stamp}'") return - if lastdate != None and lastdate - datetime.datetime.now() > datetime.timedelta( + if lastdate is not None and lastdate - datetime.datetime.now() > datetime.timedelta( days=self.offline_since_days ): self.delete_user(host, user, f"last seen @ {lastdate}") |