From e80897473ba17eaa0e1adfe03a12fb040a6ef47c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Barrag=C3=A1n=20Merino?= Date: Thu, 16 Apr 2015 11:45:50 +0200 Subject: [PATCH] Fix manage_translations.py lang_stats --- scripts/manage_translations.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/manage_translations.py b/scripts/manage_translations.py index 1eb99a63..e0bd25f3 100644 --- a/scripts/manage_translations.py +++ b/scripts/manage_translations.py @@ -119,7 +119,12 @@ def lang_stats(resources=None, languages=None): for name, dir_ in locale_dirs: print("\nShowing translations stats for '{res}':".format(res=name)) - langs = sorted([d for d in os.listdir(dir_) if not d.startswith('_')]) + + langs = [] + for d in os.listdir(dir_): + if not d.startswith('_') and os.path.isdir(os.path.join(dir_, d)): + langs.append(d) + langs = sorted(langs) for lang in langs: if languages and lang not in languages: