aboutsummaryrefslogtreecommitdiffstats
path: root/src/blimp
diff options
context:
space:
mode:
Diffstat (limited to 'src/blimp')
-rw-r--r--src/blimp/__init__.py9
-rw-r--r--src/blimp/bl_process.py2
-rw-r--r--src/blimp/main.py20
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()