python filters: create common main program inside rclexecm.py to help with testing

This commit is contained in:
Jean-Francois Dockes
2010-11-16 15:51:31 +01:00
parent d99865dbda
commit 9e994c4f62
6 changed files with 63 additions and 73 deletions
+4 -2
View File
@@ -112,6 +112,7 @@ class rclCHM:
res, doc = self.chm.RetrieveObject(ui)
#self.em.rclog("extract: RetrieveObject: %d [%s]" % (res, doc))
if res > 0:
self.em.setmimetype("text/html")
return (True, doc, path, iseof)
return (False, "", path, iseof)
@@ -146,5 +147,6 @@ class rclCHM:
self.currentindex += 1
return ret
e = rclexecm.RclExecM()
e.mainloop(rclCHM(e))
proto = rclexecm.RclExecM()
extract = rclCHM(proto)
rclexecm.main(proto, extract)