Explorar el Código

[minor] print doctype and module name if broken

version-14
Rushabh Mehta hace 8 años
padre
commit
18903d77d1
Se han modificado 1 ficheros con 8 adiciones y 2 borrados
  1. +8
    -2
      frappe/modules/__init__.py

+ 8
- 2
frappe/modules/__init__.py Ver fichero

@@ -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]



Cargando…
Cancelar
Guardar