Merge branch 'fast_load_config'

pull/227/head
aristocratos 2020-12-29 11:20:37 +01:00
commit 8aed9b2e33
1 changed files with 19 additions and 17 deletions

View File

@ -462,10 +462,12 @@ class Config:
line = line.strip() line = line.strip()
if line.startswith("#? Config"): if line.startswith("#? Config"):
new_config["version"] = line[line.find("v. ") + 3:] new_config["version"] = line[line.find("v. ") + 3:]
for key in self.keys: continue
if line.startswith(key): if not '=' in line:
line = line.replace(key + "=", "") continue
if line.startswith('"'): key, line = line.split('=', maxsplit=1)
if not key in self.keys:
continue
line = line.strip('"') line = line.strip('"')
if type(getattr(self, key)) == int: if type(getattr(self, key)) == int:
try: try: