mirror of
https://gitlab.os-k.eu/neox/CNIRevelator.git
synced 2023-08-25 14:03:10 +02:00
hotfix on the language system
This commit is contained in:
parent
2df174b234
commit
67b5c903d2
@ -79,24 +79,33 @@ def main():
|
|||||||
|
|
||||||
## BOOTSTRAP OF CNIREVELATOR
|
## 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
|
with open(globs.CNIRLangFile, 'w') as (configFile):
|
||||||
if os.path.isfile(globs.CNIRLangFile):
|
try:
|
||||||
with open(globs.CNIRLangFile, 'r') as (configFile):
|
# Writing it
|
||||||
try:
|
configFile.write(globs.CNIRlang)
|
||||||
# Reading it
|
except Exception as e:
|
||||||
globs.CNIRlang = configFile.read()
|
ihm.crashCNIR()
|
||||||
except Exception as e:
|
raise IOError(str(e))
|
||||||
ihm.crashCNIR()
|
except:
|
||||||
raise IOError(str(e))
|
ihm.crashCNIR()
|
||||||
else:
|
updater.exitProcess(1)
|
||||||
with open(globs.CNIRLangFile, 'w') as (configFile):
|
|
||||||
try:
|
|
||||||
# Writing it
|
|
||||||
configFile.write(globs.CNIRlang)
|
|
||||||
except Exception as e:
|
|
||||||
ihm.crashCNIR()
|
|
||||||
raise IOError(str(e))
|
|
||||||
|
|
||||||
# GO
|
# GO
|
||||||
try:
|
try:
|
||||||
@ -124,5 +133,6 @@ try:
|
|||||||
main()
|
main()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
ihm.crashCNIR()
|
ihm.crashCNIR()
|
||||||
|
updater.exitProcess(1)
|
||||||
|
|
||||||
updater.exitProcess(0)
|
updater.exitProcess(0)
|
@ -50,4 +50,4 @@ CNIRUrlConfig = CNIRFolder + '\\config\\urlconf.ig'
|
|||||||
CNIRVerStock = CNIRFolder + '\\downloads\\versions.lst'
|
CNIRVerStock = CNIRFolder + '\\downloads\\versions.lst'
|
||||||
CNIREnv = CNIRFolder + '\\Data\\'
|
CNIREnv = CNIRFolder + '\\Data\\'
|
||||||
|
|
||||||
CNIROpenFile = True
|
CNIROpenFile = False
|
@ -1,4 +1,4 @@
|
|||||||
"""
|
"""
|
||||||
********************************************************************************
|
********************************************************************************
|
||||||
* CNIRevelator *
|
* CNIRevelator *
|
||||||
* *
|
* *
|
||||||
@ -209,8 +209,6 @@ class LauncherWindow(Tk):
|
|||||||
logfile = logger.logCur
|
logfile = logger.logCur
|
||||||
logfile.printdbg('Launcher IHM successful')
|
logfile.printdbg('Launcher IHM successful')
|
||||||
self.protocol('WM_DELETE_WINDOW', lambda : 0)
|
self.protocol('WM_DELETE_WINDOW', lambda : 0)
|
||||||
self.attributes("-topmost", 1)
|
|
||||||
|
|
||||||
self.update()
|
self.update()
|
||||||
|
|
||||||
def printmsg(self, msg):
|
def printmsg(self, msg):
|
||||||
|
Loading…
Reference in New Issue
Block a user