浏览代码

[minor] print doctype and module name if broken

version-14
Rushabh Mehta 8 年前
父节点
当前提交
18903d77d1
共有 1 个文件被更改,包括 8 次插入2 次删除
  1. +8
    -2
      frappe/modules/__init__.py

+ 8
- 2
frappe/modules/__init__.py 查看文件

@@ -60,8 +60,14 @@ def load_doctype_module(doctype, module=None, prefix="", suffix=""):

key = (app, doctype, prefix, suffix)

if key not in doctype_python_modules:
doctype_python_modules[key] = frappe.get_module(get_module_name(doctype, module, prefix, suffix))
module_name = get_module_name(doctype, module, prefix, suffix)

try:
if key not in doctype_python_modules:
doctype_python_modules[key] = frappe.get_module(module_name)
except ImportError:
print 'Module import failed for {0} ({1})'.format(doctype, module_name)
raise

return doctype_python_modules[key]



正在加载...
取消
保存