[DEBUG] correct the user configuration path
This commit is contained in:
parent
4c50fb154d
commit
3e432ffc21
@ -156,14 +156,12 @@ def parse_generic_arg(argument, active):
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
# open configuration of island:
|
# open configuration of island:
|
||||||
config_file_name = "islandConfig.py"
|
config_file = env.get_island_path_user_config()
|
||||||
# TODO: Change get_run_path with folder of .island
|
|
||||||
config_file = os.path.join(tools.get_run_path(), config_file_name)
|
|
||||||
if os.path.isfile(config_file) == True:
|
if os.path.isfile(config_file) == True:
|
||||||
sys.path.append(os.path.dirname(config_file))
|
sys.path.append(os.path.dirname(config_file))
|
||||||
debug.debug("Find basic configuration file: '" + config_file + "'")
|
debug.debug("Find basic configuration file: '" + config_file + "'")
|
||||||
# the file exist, we can open it and get the initial configuration:
|
# the file exist, we can open it and get the initial configuration:
|
||||||
configuration_file = __import__(config_file_name[:-3])
|
configuration_file = __import__(env.get_system_config_name()[:-3])
|
||||||
|
|
||||||
if "get_exclude_path" in dir(configuration_file):
|
if "get_exclude_path" in dir(configuration_file):
|
||||||
data = configuration_file.get_exclude_path()
|
data = configuration_file.get_exclude_path()
|
||||||
|
@ -25,6 +25,10 @@ def get_system_base_name():
|
|||||||
global system_base_name
|
global system_base_name
|
||||||
return system_base_name
|
return system_base_name
|
||||||
|
|
||||||
|
def get_system_config_name():
|
||||||
|
global system_base_name
|
||||||
|
return system_base_name + "Config.py"
|
||||||
|
|
||||||
|
|
||||||
fetch_manifest = True
|
fetch_manifest = True
|
||||||
|
|
||||||
@ -96,6 +100,7 @@ elif os.path.exists(os.path.join(island_root_path, "..", "..", "..", "..", "..",
|
|||||||
else:
|
else:
|
||||||
#debug.error("the root path of " + get_system_base_name() + " must not be upper that 6 parent path")
|
#debug.error("the root path of " + get_system_base_name() + " must not be upper that 6 parent path")
|
||||||
pass
|
pass
|
||||||
|
island_path_user_config = os.path.join(island_root_path, get_system_config_name())
|
||||||
island_path = os.path.join(island_root_path, "." + get_system_base_name())
|
island_path = os.path.join(island_root_path, "." + get_system_base_name())
|
||||||
island_path_config = os.path.join(island_path, "config.txt")
|
island_path_config = os.path.join(island_path, "config.txt")
|
||||||
island_path_manifest = os.path.join(island_path, "manifest")
|
island_path_manifest = os.path.join(island_path, "manifest")
|
||||||
@ -120,4 +125,8 @@ def get_island_path_manifest():
|
|||||||
global island_path_manifest
|
global island_path_manifest
|
||||||
return island_path_manifest
|
return island_path_manifest
|
||||||
|
|
||||||
|
def get_island_path_user_config():
|
||||||
|
global island_path_user_config
|
||||||
|
return island_path_user_config
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user