def service_changed(self, event):
        """
        Called by Pelix when an events changes
        """
        kind = event.get_kind()
        reference = event.get_service_reference()

        if kind in (pelix.ServiceEvent.REGISTERED, pelix.ServiceEvent.MODIFIED):
            # A service matches our filter
            self.set_shell(reference)

        else:
            with self._lock:
                # Service is not matching our filter anymore
                self.clear_shell()

                # Request for a new binding
                self.search_shell()
def service_changed ( self , event ) : kind = event . get_kind ( ) reference = event . get_service_reference ( ) if kind in ( pelix . ServiceEvent . REGISTERED , pelix . ServiceEvent . MODIFIED ) : self . set_shell ( reference ) else : with self . _lock : self . clear_shell ( ) self . search_shell ( )
Called by Pelix when an events changes