improve docstring, remove unused custom Exception
This commit is contained in:
parent
5999368002
commit
04b8111f8f
|
@ -93,7 +93,9 @@ def add_method_wrapper(cls, wrapper_func):
|
||||||
def wrapped_call(wrap_controller, func):
|
def wrapped_call(wrap_controller, func):
|
||||||
""" Wrap calling to a function with a generator. The first yield
|
""" Wrap calling to a function with a generator. The first yield
|
||||||
will trigger calling the function and receive an according CallOutcome
|
will trigger calling the function and receive an according CallOutcome
|
||||||
object representing an exception or a result.
|
object representing an exception or a result. The generator then
|
||||||
|
needs to finish (raise StopIteration) in order for the wrapped call
|
||||||
|
to complete.
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
next(wrap_controller) # first yield
|
next(wrap_controller) # first yield
|
||||||
|
@ -362,13 +364,6 @@ def importplugin(importspec):
|
||||||
class MultiCall:
|
class MultiCall:
|
||||||
""" execute a call into multiple python functions/methods. """
|
""" execute a call into multiple python functions/methods. """
|
||||||
|
|
||||||
class WrongHookWrapper(Exception):
|
|
||||||
""" a hook wrapper does not behave correctly. """
|
|
||||||
def __init__(self, func, message):
|
|
||||||
Exception.__init__(self, func, message)
|
|
||||||
self.func = func
|
|
||||||
self.message = message
|
|
||||||
|
|
||||||
def __init__(self, methods, kwargs, firstresult=False):
|
def __init__(self, methods, kwargs, firstresult=False):
|
||||||
self.methods = list(methods)
|
self.methods = list(methods)
|
||||||
self.kwargs = kwargs
|
self.kwargs = kwargs
|
||||||
|
|
Loading…
Reference in New Issue