Skip to content

v1.1.0

Compare
Choose a tag to compare
@ken-morel ken-morel released this 26 Jul 00:53
· 20 commits to main since this release
bb728fa

were added two more methods to comberloader,
failback and fail.

fail

Use this handler in case the module fails to import

import comberload
comberload("mod1", "mod2")
def first():
   pass

@first.fail
def second(e):
   pass

failback

This is what I advice to use, it uses the default handler in case the module is
not loaded due to error or any else.

import comberload

comberload("mod1", "mod2")
def first():
   pass

@first.failback
def second(e=None):  # e will be passed if module fails to load
   pass