Skip to content

Commit 6589ebb

Browse files
committed
update config file setup in Manager class
1 parent 7900aa1 commit 6589ebb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CanDI/setup/manager.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ def __init__(self, manager_path='auto', cfig_path='auto', verbose=False):
3939
os.system(f"cp {manager_path}/data/config.draft.ini {manager_path}/data/config.ini")
4040
cfig_path = manager_path + "/data/config.ini"
4141

42+
elif type(cfig_path) == str and os.path.exists(cfig_path):
43+
cfig_path = cfig_path
44+
45+
elif type(cfig_path) == str and not os.path.exists(cfig_path):
46+
raise FileNotFoundError(f"Config file not found at {cfig_path}")
47+
4248
if verbose:
4349
print(f"Manager Path: {manager_path}")
4450
print(f"Config Path: {cfig_path}")

0 commit comments

Comments
 (0)