From dd034befaedbbe68e76b6e2478ba681e5c74fa1b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 5 Jul 2013 16:35:02 +0530 Subject: [PATCH] [documentation tool] [fix] import importlib within fns --- core/doctype/documentation_tool/documentation_tool.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/doctype/documentation_tool/documentation_tool.py b/core/doctype/documentation_tool/documentation_tool.py index 9595945551..d0bdb8dd7d 100644 --- a/core/doctype/documentation_tool/documentation_tool.py +++ b/core/doctype/documentation_tool/documentation_tool.py @@ -3,7 +3,7 @@ from __future__ import unicode_literals import webnotes -import inspect, importlib, os, json, datetime +import inspect, os, json, datetime from jinja2 import Template from webnotes.modules import get_doc_path, get_module_path, scrub @@ -50,6 +50,7 @@ def get_static_pages(): def get_docs_for(docs, name): """build docs for python module""" + import importlib classname = "" parts = name.split(".") @@ -130,6 +131,7 @@ def get_gh_url(path): return url def get_modules(for_module=None): + import importlib docs = { "_label": "Modules" } @@ -193,6 +195,7 @@ def get_modules(for_module=None): return docs def get_pages(m): + import importlib pages = webnotes.conn.sql_list("""select name from tabPage where module=%s""", m) prefix = "docs.dev.modules." + m + ".page." docs = {