A few strings fixed

This commit is contained in:
Profitroll
2022-08-11 20:39:03 +02:00
parent 3cd33b4769
commit d4a2145036
2 changed files with 10 additions and 5 deletions

View File

@@ -9,7 +9,7 @@ import os
import sys
import traceback
from signal import SIGKILL
from signal import SIGKILL # type: ignore
from modules.logging import logWrite
def jsonLoad(filename):
@@ -19,8 +19,10 @@ def jsonLoad(filename):
output = json.loads(file.read())
except JSONDecodeError:
logWrite(f"Could not load json file {filename}: file seems to be incorrect!\n{traceback.print_exc()}")
raise
except FileNotFoundError:
logWrite(f"Could not load json file {filename}: file does not seem to exist!\n{traceback.print_exc()}")
raise
file.close()
return output
@@ -68,7 +70,7 @@ def configGet(key: str, *args: str):
this_key = this_key[dict_key]
return this_key[key]
def locale(key: str, *args: list, locale=configGet("locale")):
def locale(key: str, *args: str, locale=configGet("locale")):
"""Get value of locale string
Args:
* key (str): The last key of the locale's keys path.