Updated config path
This commit is contained in:
@ -21,6 +21,8 @@ class ConfigurationFile():
|
|||||||
self.paths = []
|
self.paths = []
|
||||||
self.paths.append(".") # local first
|
self.paths.append(".") # local first
|
||||||
# grab from env
|
# 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
|
self.paths.append(self.cfg_path) # program location
|
||||||
|
|
||||||
def find_config(self):
|
def find_config(self):
|
||||||
@ -55,3 +57,9 @@ class ConfigurationFile():
|
|||||||
|
|
||||||
def set_config(self, name, val):
|
def set_config(self, name, val):
|
||||||
self.config[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)
|
||||||
|
|||||||
Reference in New Issue
Block a user