X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fmanagers%2Fmanagerwrapper.py;h=946f7d2b9762fe64d71c3d0989eddd78af02ab51;hb=1cc8e9613cab8b5b22478de369f259e591c54e6d;hp=86907e790968785fa60d234093a178aacd2dbb70;hpb=3ec592bea594e4cd9aeb273f9ff8ef393fec6871;p=sfa.git diff --git a/sfa/managers/managerwrapper.py b/sfa/managers/managerwrapper.py index 86907e79..946f7d2b 100644 --- a/sfa/managers/managerwrapper.py +++ b/sfa/managers/managerwrapper.py @@ -15,15 +15,18 @@ class ManagerWrapper: is not implemented by a libarary and will generally be more helpful than the standard AttributeError """ - def __init__(self, manager, interface): + def __init__(self, manager, interface, config): if isinstance (manager, ModuleType): # old-fashioned module implementation self.manager = manager elif isinstance (manager, ClassType): # create an instance; we don't pass the api in argument as it is passed # to the actual method calls anyway - self.manager = manager() + self.manager = manager(config) else: + # that's what happens when there's something wrong with the db + # or any bad stuff of that kind at startup time + logger.log_exc("Failed to create a manager, startup sequence is broken") raise SfaAPIError,"Argument to ManagerWrapper must be a module or class" self.interface = interface