fix config file variable
This commit is contained in:
@@ -104,10 +104,10 @@ def config_load(conf=''):
|
|||||||
config = ConfigParser(strict=False)
|
config = ConfigParser(strict=False)
|
||||||
# fist check if file is given
|
# fist check if file is given
|
||||||
if conf:
|
if conf:
|
||||||
config_file_path = conf
|
config_file = conf
|
||||||
else:
|
else:
|
||||||
# check if config file is located at the script's location
|
# check if config file is located at the script's location
|
||||||
config_file = path.dirname(path.realpath(__file__)) + sep + CONFIG_FILE_NAME # realpath; resolve symlink
|
config_file = path.join(path.dirname(path.realpath(__file__)), CONFIG_FILE_NAME) # realpath; resolve symlink
|
||||||
if not path.exists(config_file):
|
if not path.exists(config_file):
|
||||||
# if not, use the file inside .config
|
# if not, use the file inside .config
|
||||||
makedirs(CONFIG_DIR, exist_ok=True)
|
makedirs(CONFIG_DIR, exist_ok=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user