test
This commit is contained in:
parent
c651950e7c
commit
e7584702a7
2
main.py
2
main.py
|
@ -10,7 +10,7 @@ try :
|
||||||
config_path = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.cfg"
|
config_path = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.cfg"
|
||||||
if config.read(config_path)==[] :
|
if config.read(config_path)==[] :
|
||||||
raise NameError("le fichier n'existe pas")
|
raise NameError("le fichier n'existe pas")
|
||||||
except : #doesn't work
|
except :
|
||||||
default_config = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.default"
|
default_config = f"{os.path.abspath( os.path.dirname( __file__ ) )}/user_data/config.default"
|
||||||
shutil.copyfile(default_config, config_path)
|
shutil.copyfile(default_config, config_path)
|
||||||
config.read(config_path)
|
config.read(config_path)
|
||||||
|
|
Loading…
Reference in New Issue