Patching Dec 9, 2021 6-7a CST- All GitLab services may be unavailable for 5-10 minutes

Commit ce863d08 authored by Peter Hartman's avatar Peter Hartman
Browse files

devel 08/2/21 1052

parent c42229ea
......@@ -22,6 +22,7 @@ from os import path
config_file = "/etc/settool.conf"
@click.group()
def cli():
pass
......@@ -42,8 +43,24 @@ def add_project():
pass
def get_settings():
settings = []
settings["working_dir"] = "Not Set"
return settings
def setup_setup():
pass
msg = "File " + config_file + "not found. Create? (y/n)"
response = input(msg)
if response.lower() == "y":
with open(config_file, mode="w") as cf_fp:
settings = get_settings()
if "working_dir" not in settings:
print("Entry incorrect")
exit()
else:
data = {"working_dir": settings["working_dir"]}
yaml.dump(data, cf_fp)
def check_setup():
......@@ -53,12 +70,16 @@ def check_setup():
conf_yaml = yaml.safe_load(conf_fp)
except yaml.YAMLError as exc:
print(exc)
else
else:
setup_setup()
if not "working_dir" in conf_yaml.keys():
if "working_dir" not in conf_yaml.keys():
setup_setup()
def make_project(project_path, project_name):
pass
if __name__ == '__main__':
cli()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment