diff options
author | nico wellpott <nico@magicbroccoli.de> | 2021-04-06 11:23:09 +0200 |
---|---|---|
committer | nico wellpott <nico@magicbroccoli.de> | 2021-04-06 11:23:09 +0200 |
commit | eda0a709c9bc0eb42f6fccce4e00285dfff60bd9 (patch) | |
tree | 9862e15e63891ec6cdb8a0e6ff800164741d9818 | |
parent | c9e689b3f3d043933ea953448832c8cc718cd28f (diff) |
cleanup: make flake8 happy again
* remove wildcard import
* remove unnecessary imports
* various smaller whitespace cleanups
-rw-r--r-- | src/blimp/__init__.py | 9 | ||||
-rw-r--r-- | src/blimp/bl_process.py | 2 | ||||
-rw-r--r-- | src/blimp/main.py | 20 |
3 files changed, 5 insertions, 26 deletions
diff --git a/src/blimp/__init__.py b/src/blimp/__init__.py index 769e3ce..19c2b68 100644 --- a/src/blimp/__init__.py +++ b/src/blimp/__init__.py @@ -3,12 +3,3 @@ # version __version__ = "0.1" - -# modules -from .bl_process import ProcessBlocklist - -# main -from .main import Blimp - -# utils -from .misc import * diff --git a/src/blimp/bl_process.py b/src/blimp/bl_process.py index 2e56275..e0db3da 100644 --- a/src/blimp/bl_process.py +++ b/src/blimp/bl_process.py @@ -4,7 +4,7 @@ import sys from ruamel.yaml import YAML, scalarstring -from .misc import * +from .misc import local_file_present class ProcessBlocklist: diff --git a/src/blimp/main.py b/src/blimp/main.py index 4189bbc..fccf9af 100644 --- a/src/blimp/main.py +++ b/src/blimp/main.py @@ -1,11 +1,13 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- +from pathlib import Path + import requests from appdirs import user_cache_dir from .bl_process import ProcessBlocklist -from .misc import * +from .misc import local_file_present class Blimp: @@ -89,21 +91,7 @@ class Blimp: # blacklist processing ProcessBlocklist.process(self.blacklist, self.outfile, self.dryrun) - """ - # reload config if changes have been applied - if self.change: - # catch ejabberdctl missing - if Path("/usr/sbin/ejabberdctl").is_file(): - subprocess.call(["/usr/sbin/ejabberdctl", "reload_config"], shell=False) - - # report missing ejabberdctl reload_config - else: - print("/usr/sbin/ejabberdctl was not found", file=sys.stderr) - print("blacklist changes have been applied\nejabberd config was not reloaded", file=sys.stderr) - sys.exit(1) - """ - if __name__ == "__main__": - from .cli import cli + from .cli import cli cli() |