forked from 0x2620/pandora
better error if we have invalid locale files
This commit is contained in:
parent
a8d906743a
commit
56f248894e
1 changed files with 5 additions and 1 deletions
|
@ -327,7 +327,11 @@ def update_static():
|
||||||
#locale
|
#locale
|
||||||
for f in sorted(glob(os.path.join(settings.STATIC_ROOT, 'json/locale.pandora.*.json'))):
|
for f in sorted(glob(os.path.join(settings.STATIC_ROOT, 'json/locale.pandora.*.json'))):
|
||||||
with open(f) as fd:
|
with open(f) as fd:
|
||||||
locale = json.load(fd)
|
try:
|
||||||
|
locale = json.load(fd)
|
||||||
|
except:
|
||||||
|
print("failed to parse %s" % f)
|
||||||
|
raise
|
||||||
site_locale = f.replace('locale.pandora', 'locale.' + settings.CONFIG['site']['id'])
|
site_locale = f.replace('locale.pandora', 'locale.' + settings.CONFIG['site']['id'])
|
||||||
locale_file = f.replace('locale.pandora', 'locale')
|
locale_file = f.replace('locale.pandora', 'locale')
|
||||||
print('write', locale_file)
|
print('write', locale_file)
|
||||||
|
|
Loading…
Reference in a new issue