From 17c7ca239aa2d17ac5d6abd601ecae78a343499e Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Thu, 28 Sep 2017 12:24:00 -0700 Subject: [PATCH] Fixing missing messages.json file (#3547) --- superset/translations/utils.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/superset/translations/utils.py b/superset/translations/utils.py index 74a91a8b9..56839f5e3 100644 --- a/superset/translations/utils.py +++ b/superset/translations/utils.py @@ -23,11 +23,11 @@ def get_language_pack(locale): pack = ALL_LANGUAGE_PACKS.get(locale) if not pack: filename = DIR + '/{}/LC_MESSAGES/messages.json'.format(locale) - with open(filename) as f: - try: + try: + with open(filename) as f: pack = json.load(f) ALL_LANGUAGE_PACKS[locale] = pack - except Exception: - # Assuming english, client side falls back on english - pass + except Exception: + # Assuming english, client side falls back on english + pass return pack