Beispiel #1
0
    def stop(self, context):
        """
        Bundle stopped
        """
        assert isinstance(context, BundleContext)
        assert self.context is context

        if fw_raiser:
            raise FrameworkException("Framework Exception", fw_raiser_stop)

        if raiser:
            raise Exception("Some exception")

        global stopped
        stopped = True
Beispiel #2
0
    def bind(self, svc, svc_ref):
        """
        Bound
        """
        self.states.append(IPopoEvent.BOUND)
        self.ref = svc_ref

        # Assert that the service is already usable
        assert self.service.echo(True)

        if self.fw_raiser:
            raise FrameworkException("FrameworkException", self.fw_raiser_stop)

        if self.raiser:
            raise Exception("Some exception")
Beispiel #3
0
    def unbind(self, svc, svc_ref):
        """
        Unbound
        """
        self.states.append(IPopoEvent.UNBOUND)

        # Assert that the service is still usable
        assert self.service.echo(True)
        assert self.ref is svc_ref
        self.ref = None

        if self.fw_raiser:
            raise FrameworkException("FrameworkException", self.fw_raiser_stop)

        if self.raiser:
            raise Exception("Some exception")