From 78c4bd5d1fdf9ca1f4239db25ca02a21004c65b2 Mon Sep 17 00:00:00 2001 From: Pratik Vyas Date: Mon, 2 Mar 2015 18:15:36 +0530 Subject: [PATCH] fix erpnext/#2883 --- frappe/translate.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/frappe/translate.py b/frappe/translate.py index 89db17d8df..653e195235 100644 --- a/frappe/translate.py +++ b/frappe/translate.py @@ -289,9 +289,10 @@ def _get_messages_from_page_or_report(doctype, name, module=None): messages = get_messages_from_file(os.path.join(doc_path, name +".py")) - for filename in os.listdir(doc_path): - if filename.endswith(".js") or filename.endswith(".html"): - messages += get_messages_from_file(os.path.join(doc_path, filename)) + if os.path.exists(doc_path): + for filename in os.listdir(doc_path): + if filename.endswith(".js") or filename.endswith(".html"): + messages += get_messages_from_file(os.path.join(doc_path, filename)) return messages