Convert modules to new importer
This commit is contained in:
parent
1f5364c387
commit
28005e5654
23 changed files with 166 additions and 187 deletions
|
|
@ -17,15 +17,14 @@ from . import whois
|
|||
|
||||
def load(context):
|
||||
for mod in [isup, page, w3c, watchWebsite, whois]:
|
||||
mod.add_event = add_event
|
||||
mod.del_event = del_event
|
||||
mod.save = save
|
||||
mod.add_event = context.add_event
|
||||
mod.del_event = context.del_event
|
||||
mod.save = context.save
|
||||
mod.print = print
|
||||
mod.print_debug = print_debug
|
||||
mod.send_response = send_response
|
||||
page.load(CONF, add_hook)
|
||||
watchWebsite.load(DATAS)
|
||||
whois.load(CONF, add_hook)
|
||||
mod.send_response = context.send_response
|
||||
page.load(context.config, context.add_hook)
|
||||
watchWebsite.load(context.data)
|
||||
whois.load(context.config, context.add_hook)
|
||||
|
||||
|
||||
def help_full():
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ def start_watching(site, offset=0):
|
|||
"""
|
||||
|
||||
o = urlparse(site["url"], "http")
|
||||
print_debug("Add %s event for site: %s" % (site["type"], o.netloc))
|
||||
#print_debug("Add %s event for site: %s" % (site["type"], o.netloc))
|
||||
|
||||
evt = ModuleEvent(func=lambda url: page.render(url, None),
|
||||
cmp_data=site["lastcontent"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue