summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBotond Hende <nettingman@gmail.com>2024-08-20 11:59:57 +0200
committerBotond Hende <nettingman@gmail.com>2024-08-20 11:59:57 +0200
commitb411beae45bb8b8aa7fb6e05ba6039b8f6ebb839 (patch)
tree88786d757e20df37bafe7c64a17c3cfed14cce35
parentb0bdd79ba340e879f3f79b9dd04f7509f8c681d5 (diff)
moved config data to config.py
-rw-r--r--__main__.py8
-rw-r--r--config.py3
2 files changed, 6 insertions, 5 deletions
diff --git a/__main__.py b/__main__.py
index 5cba034..46d2815 100644
--- a/__main__.py
+++ b/__main__.py
@@ -1,12 +1,10 @@
import os.path
from .modules import daemon
-
-AGENT_SYMBOL = "WAZUL"
-TOKEN_FILE_NAME = "sta.token"
+from .config import Config
if __name__ == "__main__":
- with open(os.path.join(os.path.dirname(__file__), TOKEN_FILE_NAME)) as f:
+ with open(os.path.join(os.path.dirname(__file__), Config.TOKEN_FILE_NAME)) as f:
token = f.read().strip()
- d = daemon.Daemon(AGENT_SYMBOL, token)
+ d = daemon.Daemon(Config.AGENT_SYMBOL, token)
d.run()
diff --git a/config.py b/config.py
new file mode 100644
index 0000000..87c9872
--- /dev/null
+++ b/config.py
@@ -0,0 +1,3 @@
+class Config:
+ AGENT_SYMBOL = 'WAZUL'
+ TOKEN_FILE_NAME = 'sta.token'