From f7c4f5459c681fef86003dbc57f24ba49efc01a8 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sat, 11 Jun 2011 18:27:13 +0700 Subject: [PATCH] Support wiki pages names in python modules. Also this fixes showing python modules in available modules list. --- modules/modpython/znc.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/modpython/znc.py b/modules/modpython/znc.py index 054316a6..3cc89b61 100644 --- a/modules/modpython/znc.py +++ b/modules/modpython/znc.py @@ -151,6 +151,8 @@ class ModuleNV(collections.MutableMapping): class Module: description = '< Placeholder for a description >' + wiki_page = '' + def __str__(self): return self.GetModName() @@ -498,6 +500,7 @@ def get_mod_info(modname, retmsg, modinfo): cl = pymodule.__dict__[modname] modinfo.SetGlobal(False) modinfo.SetDescription(cl.description) + modinfo.SetWikiPage(cl.wiki_page) modinfo.SetName(modname) modinfo.SetPath(pymodule.__file__) return 2 @@ -524,7 +527,8 @@ def get_mod_info_path(path, modname, modinfo): return 0 cl = pymodule.__dict__[modname] modinfo.SetGlobal(False) - modinfo.SetDescription(get_descr(cl)) + modinfo.SetDescription(cl.description) + modinfo.SetWikiPage(cl.wiki_page) modinfo.SetName(modname) modinfo.SetPath(pymodule.__file__) return 1