]>
jfr.im git - erebus.git/blob - modlib.py
2 def __init__(self
, desc
):
5 return False #object will test to False
7 return '<modlib.error %r>' % self
.errormsg
12 def __init__(self
, name
):
18 def modstart(self
, parent
):
20 for cmd
, func
in self
.hooks
.iteritems():
21 self
.parent
.hook(cmd
, func
)
22 def modstop(self
, parent
):
23 for cmd
, func
in self
.hooks
.iteritems():
24 self
.parent
.unhook(cmd
, func
)
28 self
.hooks
[cmd
] = func
29 if self
.parent
is not None:
30 self
.parent
.hook(cmd
, func
)