Updated config path

This commit is contained in:
2021-12-07 12:45:52 -05:00
parent 54eeb99d42
commit c1770850f7

View File

@ -21,6 +21,8 @@ class ConfigurationFile():
self.paths = []
self.paths.append(".") # local first
# grab from env
if 'NTCNA_PYVEHICLE_PATH' in os.environ:
self.paths.append(os.environ['NTCNA_PYVEHICLE_CFGPATH'].split(':'))
self.paths.append(self.cfg_path) # program location
def find_config(self):
@ -55,3 +57,9 @@ class ConfigurationFile():
def set_config(self, name, val):
self.config[name] = val
def path_append(self, path):
if os.path.exists(path):
self.paths.append(path)
else:
print("Path not found: ", path)