def __init__(self, handler): if not IProtoHandler.implementedBy(handler.__class__) : raise TypeError('handler has to implement devicehive.interfaces.IProtoHandler interface.') self.handler = handler self.handler.factory = self self.devices = {} self.factories = {} self.timestamp = datetime.utcnow()
def __init__(self, handler): if not IProtoHandler.implementedBy(handler.__class__): raise TypeError( 'The protocol handler has to conform to IProtoHandler interface.' ) self.handler = handler self.handler.factory = self self.factory = None
def __init__(self, handler): """ @type handler: C{object} @param handler: handler has to implement C{IProtoHandler} interface """ self.handler = handler if IProtoHandler.implementedBy(self.handler.__class__) : self.handler.factory = self else : raise TypeError('handler should implements IProtoHandler interface') self.devices = {}
def __init__(self, handler): """ @type handler: C{object} @param handler: handler has to implement C{IProtoHandler} interface """ self.handler = handler if IProtoHandler.implementedBy(self.handler.__class__): self.handler.factory = self else: raise TypeError('handler should implements IProtoHandler interface') self.devices = {}
def __init__(self, handler): if not IProtoHandler.implementedBy(handler.__class__) : raise TypeError('The protocol handler has to conform to IProtoHandler interface.') self.handler = handler self.handler.factory = self self.factory = None