syntax and pep8

what have I become - a pep8 monster
This commit is contained in:
nico 2020-06-10 12:40:19 +02:00
parent b8de1646c5
commit bfa47d1ae0
Signed by: mightyBroccoli
GPG Key ID: EA7C31AAB1BDC1A2
1 changed files with 4 additions and 4 deletions

View File

@ -1,7 +1,8 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import logging
import datetime import datetime
import logging
from control import EjabberdCtl from control import EjabberdCtl
@ -11,7 +12,7 @@ class EjabberdCleanup(EjabberdCtl):
self.ignore_hosts = [] self.ignore_hosts = []
self.ignore_usernames = [] self.ignore_usernames = []
self.dry = False self.dry = False
self.skip_by_roster_roster = True self.skip_by_roster = True
self.delete_not_login = True self.delete_not_login = True
self.offline_since_days = None 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): if lastdate != None and lastdate-datetime.datetime.now() > datetime.timedelta(days=self.offline_since_days):
self.delete_user(host, user, f"last seen @ {lastdate}") self.delete_user(host, user, f"last seen @ {lastdate}")
return return
def run(self): def run(self):
for host in self.fetch_vhosts(): for host in self.fetch_vhosts():
@ -58,8 +58,8 @@ class EjabberdCleanup(EjabberdCtl):
continue continue
self.run_user(host, user) self.run_user(host, user)
if __name__ == "__main__": if __name__ == "__main__":
import json
from config import Config from config import Config
# load config # load config