diff options
| author | Loic Guegan <loic.guegan@mailbox.org> | 2023-10-25 15:58:01 +0200 |
|---|---|---|
| committer | Loic Guegan <loic.guegan@mailbox.org> | 2023-10-25 15:58:01 +0200 |
| commit | 1030dd08ebe9137b01754e85ad7c9ae4182f29aa (patch) | |
| tree | f50ab5ebefab45654a5d46a1c9a2a517665cb9b3 | |
| parent | caa032a09de387d44e814e73d345c1955f80d8b1 (diff) | |
Minor changes
| -rw-r--r-- | clusterman/__main__.py | 3 | ||||
| -rw-r--r-- | clusterman/config.py | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/clusterman/__main__.py b/clusterman/__main__.py index ee05623..13f4cbd 100644 --- a/clusterman/__main__.py +++ b/clusterman/__main__.py @@ -1,4 +1,5 @@ import argparse,sys +from clusterman.config import Config from clusterman.commands import node def main(): @@ -14,6 +15,8 @@ def main(): # Parse arguments: args = parser.parse_args() + a=Config() + # Run the proper handler if args.command == "node": print("Do node related stuff") diff --git a/clusterman/config.py b/clusterman/config.py new file mode 100644 index 0000000..04cac10 --- /dev/null +++ b/clusterman/config.py @@ -0,0 +1,9 @@ +from pathlib import Path +import os, json + +class Config: + CONF_DIR=os.path.join(os.environ['HOME'],".clusterman/") + + def __init__(self): + Path(self.CONF_DIR).mkdir(parents=True, exist_ok=True) + print(self.CONF_DIR) |
