FIXED: configuration file in Windows OS

This commit is contained in:
Wiktor Mazur
2019-09-24 22:07:58 +02:00
parent fbf2228263
commit 418969e6c2
2 changed files with 14 additions and 4 deletions
+10 -2
View File
@@ -15,10 +15,18 @@ opacity = 0.5
version = '%s'
""" % (CFG_VERSION)
_script_path = None
def set_script_path(path):
global _script_path
_script_path = path
def config():
global _script_path
conf_file = os.path.join(os.path.dirname(
os.path.realpath(__file__)), 'albion-online-stats.cfg')
_script_path), 'albion-online-stats.cfg')
try:
with open(conf_file, "r") as cfg_file:
@@ -32,4 +40,4 @@ def config():
cfg_file.write(default)
return toml.loads(default)
return {}
return {}