forked from Sysdeploy/cloud-init-cherrypy
Config directory fix
- locates config in the same directory as the main file
This commit is contained in:
parent
af931ae745
commit
360917be5d
2
main.py
2
main.py
|
@ -11,7 +11,7 @@ import configparser
|
||||||
PATH = os.path.dirname(os.path.abspath(__file__))
|
PATH = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read("config.ini")
|
config.read(os.path.join(PATH, "config.ini"))
|
||||||
|
|
||||||
user_data_filename = config["app"].get("user_data", "sample_file.txt")
|
user_data_filename = config["app"].get("user_data", "sample_file.txt")
|
||||||
meta_data_filename = config["app"].get("meta_data", "meta_data_extra.txt")
|
meta_data_filename = config["app"].get("meta_data", "meta_data_extra.txt")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user