summaryrefslogtreecommitdiffstats
path: root/silpa/common/modulemanager.py
diff options
context:
space:
mode:
authoraashiks <aashiks@gmail.com>2009-04-30 12:40:23 +0530
committeraashiks <aashiks@gmail.com>2009-04-30 12:40:23 +0530
commit560d36aa534a458eee1663e56bf600286c802c6d (patch)
tree3d6ef34d17bf6fd87e9ab7f842a221415e341c9b /silpa/common/modulemanager.py
parent0bc0f508ebba733e8fe8430cbd4aab9e74fdcb69 (diff)
parent101ae75439d5e33e20b11243426028956abe93ad (diff)
downloadRachana.git-560d36aa534a458eee1663e56bf600286c802c6d.tar.gz
Rachana.git-560d36aa534a458eee1663e56bf600286c802c6d.tar.xz
Rachana.git-560d36aa534a458eee1663e56bf600286c802c6d.zip
Merge branch 'master' of ssh://aashiks@git.sv.nongnu.org/srv/git/smc
Diffstat (limited to 'silpa/common/modulemanager.py')
-rw-r--r--silpa/common/modulemanager.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/silpa/common/modulemanager.py b/silpa/common/modulemanager.py
index 8f9c79d..a3e9f1b 100644
--- a/silpa/common/modulemanager.py
+++ b/silpa/common/modulemanager.py
@@ -18,6 +18,7 @@ class ModuleManager:
return obj
def getModuleInstance(self,action):
+ action=action.replace(" ","_")
module_name = self.find_module(action)
if(module_name):
try:
@@ -37,8 +38,12 @@ class ModuleManager:
response = response+"<table class=\"table1\"><tr><th>Module</th><th>Description</th><th>Status</th></tr>"
for action in module_dict:
module_instance=self.getModuleInstance(action)
- response = response+"<tr><td><a href='?action="+ action +"'>"+module_instance.get_module_name()+"</a></td>"
- response = response+"<td>"+module_instance.get_info()+"</td><td>OK</td></tr>"
+ if(module_instance!=None):
+ response = response+"<tr><td><a href='?action="+ action +"'>"+module_instance.get_module_name()+"</a></td>"
+ response = response+"<td>"+module_instance.get_info()+"</td><td>OK</td></tr>"
+ else:
+ response = response+"<tr><td>"+action.replace("_"," ")+"</td>"
+ response = response+"<td>Error while retrieving module details</td><td>Fail</td></tr>"
return response+"</table>"
if __name__ == '__main__':
mm=ModuleManager()