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
|
||||
for f in sorted(glob(os.path.join(settings.STATIC_ROOT, 'json/locale.pandora.*.json'))):
|
||||
with open(f) as 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'])
|
||||
locale_file = f.replace('locale.pandora', 'locale')
|
||||
print('write', locale_file)
|
||||
|
|
Loading…
Reference in a new issue