mirror of
https://github.com/Dasemu/Transcriptarr.git
synced 2026-11-27 15:36:08 +00:00
Add check for invalid kwargs
This commit is contained in:
1 parent
c1d2e0d874
commit
bdd5fd23a7
1 file changed
+4
@@ -104,7 +104,11 @@ def update_env_variables():
|
||||
custom_regroup = os.getenv('CUSTOM_REGROUP', 'cm_sl=84_sl=42++++++1')
|
||||
detect_language_length = os.getenv('DETECT_LANGUAGE_LENGTH', 30)
|
||||
skipifexternalsub = convert_to_bool(os.getenv('SKIPIFEXTERNALSUB', False))
|
||||
try:
|
||||
kwargs = ast.literal_eval(os.getenv('SUBGEN_KWARGS', '{}') or '{}')
|
||||
except ValueError:
|
||||
kwargs = {}
|
||||
logging.info("kwargs (SUBGEN_KWARGS) is an invalid dictionary, defaulting to empty '{}'")
|
||||
|
||||
set_env_variables('subgen.env')
|
||||
|
||||
|
||||
Reference in new issue
Block a user