config parsing works with persistance
This commit is contained in:
@@ -18,4 +18,5 @@ ctf = "ctf.main:main"
|
||||
[tool.hatch.build.targets.wheel]
|
||||
packages = ["src/ctf"]
|
||||
|
||||
[tool.pyright]
|
||||
extraPaths = ["src"]
|
||||
|
||||
@@ -7,12 +7,12 @@ from pathlib import Path
|
||||
from platformdirs import user_config_dir
|
||||
from platformdirs import user_data_dir
|
||||
# Parse config file
|
||||
# CONFIG_DIR = Path(user_config_dir("ctf")) #config directory is $XDG_CONFIG_HOME/ctf/
|
||||
CONFIG_DIR = Path("/home/venus/code/ctf/")
|
||||
CONFIG_FILE = CONFIG_DIR / "config.toml"
|
||||
|
||||
|
||||
def load_config():
|
||||
# CONFIG_DIR = Path(user_config_dir("ctf")) #config directory is $XDG_CONFIG_HOME/ctf/
|
||||
CONFIG_DIR = Path("/home/venus/code/ctf/")
|
||||
CONFIG_FILE = CONFIG_DIR / "config.toml"
|
||||
if not CONFIG_FILE.exists():
|
||||
print("nothing in config, relying on default opts")
|
||||
#this is where to declare default vals if not otherwise specified
|
||||
|
||||
Reference in New Issue
Block a user