Exemplo n.º 1
0
    def verify_custom_hook_classname(classname):
        # Don't wrap the load_class() in a try/except block; just let the
        # error propagate back to the caller such that they're given the
        # maximum amount of information to assist in debugging.
        from .custom_hook import CustomHook

        cls = load_class(classname)
        if not isinstance(cls(), CustomHook):
            raise CommandError("custom hook class '%s' does not derive from " "evn.custom_hook.CustomHook" % classname)
Exemplo n.º 2
0
 def verify_custom_hook_classname(classname):
     # Don't wrap the load_class() in a try/except block; just let the
     # error propagate back to the caller such that they're given the
     # maximum amount of information to assist in debugging.
     from .custom_hook import CustomHook
     cls = load_class(classname)
     if not isinstance(cls(), CustomHook):
         raise CommandError("custom hook class '%s' does not derive from "
                            "evn.custom_hook.CustomHook" % classname)
Exemplo n.º 3
0
 def custom_hook_class(self):
     return load_class(self.custom_hook_classname)
Exemplo n.º 4
0
 def custom_hook_class(self):
     return load_class(self.custom_hook_classname)