4.0 Alpha (Build 19350)

This commit is contained in:
2020-08-06 18:22:56 +02:00
Unverified
parent cdb2541292
commit 684ef6ae2a
11 changed files with 629 additions and 348 deletions

View File

@@ -45,7 +45,7 @@ except ModuleNotFoundError:
def CheckConfig(settings):
# Ilość wierszy
try:
if len(settings) != 2:
if len(settings) != 5:
error = int('x')
except ValueError:
MDdlg.err(1)
@@ -66,6 +66,12 @@ def CheckConfig(settings):
except ValueError:
MDdlg.err(3)
# Linia 4 (int)
try:
x = int(settings[3])
except ValueError:
MDdlg.err(17)
# Odczytywanie ustawień z pliku konfiguracyjnego
@@ -95,7 +101,10 @@ def edit(settings):
else:
SettingsToSave = []
SettingsToSave.append('Ciemny motyw(0/1): ' + str(settings[0]) + '\n')
SettingsToSave.append('Kodowanie wyjsciowe: ' + str(settings[1]))
SettingsToSave.append('Kodowanie wyjsciowe: ' + str(settings[1]) + '\n')
SettingsToSave.append('Domena: ' + str(settings[2]) + '\n')
SettingsToSave.append('Quota: ' + str(settings[3]) + '\n')
SettingsToSave.append('Kraj: ' + str(settings[4]))
with open('.\config.cfg', 'w') as cfg:
for x in SettingsToSave:
cfg.write(x)