hotfix on the language system

This commit is contained in:
Adrien Bourmault 2019-08-12 17:29:22 +02:00 committed by GitHub
parent 2df174b234
commit 67b5c903d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 21 deletions

View File

@ -79,24 +79,33 @@ def main():
## BOOTSTRAP OF CNIREVELATOR
try:
# LANGUAGE
if os.path.isfile(globs.CNIRLangFile):
with open(globs.CNIRLangFile, 'r') as (configFile):
try:
# Reading it
globs.CNIRlang = configFile.read()
except Exception as e:
ihm.crashCNIR()
raise IOError(str(e))
else:
# Recreating the url file
try:
os.mkdir(globs.CNIRFolder + '\\config')
except:
pass
# LANGUAGE
if os.path.isfile(globs.CNIRLangFile):
with open(globs.CNIRLangFile, 'r') as (configFile):
try:
# Reading it
globs.CNIRlang = configFile.read()
except Exception as e:
ihm.crashCNIR()
raise IOError(str(e))
else:
with open(globs.CNIRLangFile, 'w') as (configFile):
try:
# Writing it
configFile.write(globs.CNIRlang)
except Exception as e:
ihm.crashCNIR()
raise IOError(str(e))
with open(globs.CNIRLangFile, 'w') as (configFile):
try:
# Writing it
configFile.write(globs.CNIRlang)
except Exception as e:
ihm.crashCNIR()
raise IOError(str(e))
except:
ihm.crashCNIR()
updater.exitProcess(1)
# GO
try:
@ -124,5 +133,6 @@ try:
main()
except Exception as e:
ihm.crashCNIR()
updater.exitProcess(1)
updater.exitProcess(0)

View File

@ -50,4 +50,4 @@ CNIRUrlConfig = CNIRFolder + '\\config\\urlconf.ig'
CNIRVerStock = CNIRFolder + '\\downloads\\versions.lst'
CNIREnv = CNIRFolder + '\\Data\\'
CNIROpenFile = True
CNIROpenFile = False

View File

@ -1,4 +1,4 @@
"""
"""
********************************************************************************
* CNIRevelator *
* *
@ -209,8 +209,6 @@ class LauncherWindow(Tk):
logfile = logger.logCur
logfile.printdbg('Launcher IHM successful')
self.protocol('WM_DELETE_WINDOW', lambda : 0)
self.attributes("-topmost", 1)
self.update()
def printmsg(self, msg):