X-Git-Url: https://jfr.im/git/erebus.git/blobdiff_plain/a8553c45336be4a753376127fcad5c9034cae707..6de27fd45ab8ed23503aab4249fac2e2638e7c3e:/modlib.py diff --git a/modlib.py b/modlib.py index 89a75d4..9082326 100644 --- a/modlib.py +++ b/modlib.py @@ -42,6 +42,13 @@ class modlib(object): self.name = (name.split("."))[-1] def modstart(self, parent): + #modstart can return a few things... + # None: unspecified success + # False: unspecified error + # modlib.error (or anything else False-y): specified error + # True: unspecified success + # non-empty string (or anything else True-y): specified success + #"specified" values will be printed. unspecified values will result in "OK" or "failed" self.parent = parent for cmd, func in self.hooks.iteritems(): self.parent.hook(cmd, func) @@ -102,6 +109,7 @@ class modlib(object): func.reqglevel = glevel func.reqclevel = clevel func.cmd = cmd + func.module = func.__module__.split('.')[1] for c in cmd: self.hooks[c] = func