diff options
author | nico <nico@magicbroccoli.de> | 2020-06-10 12:40:19 +0200 |
---|---|---|
committer | nico <nico@magicbroccoli.de> | 2020-06-10 12:40:19 +0200 |
commit | bfa47d1ae0ab1c5f99cd2f2b0945eea3fecb0253 (patch) | |
tree | 5369f099532aa3541f7d559a43e37edc148811ca | |
parent | b8de1646c58450748c2e1930999379010f05d237 (diff) |
syntax and pep8
what have I become - a pep8 monster
-rwxr-xr-x | cleanup.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,7 +1,8 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import logging import datetime +import logging + from control import EjabberdCtl @@ -11,7 +12,7 @@ class EjabberdCleanup(EjabberdCtl): self.ignore_hosts = [] self.ignore_usernames = [] self.dry = False - self.skip_by_roster_roster = True + self.skip_by_roster = True self.delete_not_login = True self.offline_since_days = None @@ -46,7 +47,6 @@ class EjabberdCleanup(EjabberdCtl): if lastdate != None and lastdate-datetime.datetime.now() > datetime.timedelta(days=self.offline_since_days): self.delete_user(host, user, f"last seen @ {lastdate}") return - def run(self): for host in self.fetch_vhosts(): @@ -58,8 +58,8 @@ class EjabberdCleanup(EjabberdCtl): continue self.run_user(host, user) + if __name__ == "__main__": - import json from config import Config # load config |