mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
handle duplicate extensions and redo exception handler
This commit is contained in:
@@ -2,6 +2,7 @@ import json
|
||||
import os
|
||||
import sys
|
||||
import modules.shared as shared
|
||||
import modules.errors as errors
|
||||
|
||||
|
||||
localizations = {}
|
||||
@@ -31,8 +32,8 @@ def localization_js(current_localization_name):
|
||||
try:
|
||||
with open(fn, "r", encoding="utf8") as file:
|
||||
data = json.load(file)
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
print(f"Error loading localization from {fn}:", file=sys.stderr)
|
||||
shared.exception()
|
||||
errors.display(e, 'localization')
|
||||
|
||||
return f"var localization = {json.dumps(data)}\n"
|
||||
|
||||
Reference in New Issue
Block a user