From 1030dd08ebe9137b01754e85ad7c9ae4182f29aa Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Wed, 25 Oct 2023 15:58:01 +0200 Subject: [PATCH] Minor changes --- clusterman/__main__.py | 3 +++ clusterman/config.py | 9 +++++++++ 2 files changed, 12 insertions(+) create mode 100644 clusterman/config.py 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)