(self)
Starts the registry server (blocks)
Starts the registry server (blocks)
Starts the registry server ( blocks )
def start(self):
        """Starts the registry server (blocks)"""
        if self.active:
            raise ValueError("server is already running")
        if self.sock is None:
            raise ValueError("object disposed")
        self.logger.debug("server started on %s:%s", *self.sock.getsockname()[:2])
        try:
            self.active = True
            self._work()
        except KeyboardInterrupt:
            self.logger.warn("User interrupt!")
        finally:
            self.active = False
            self.logger.debug("server closed")
            self.sock.close()
            self.sock = None
def start ( self ) : if self . active : raise ValueError ( "server is already running" ) if self . sock is None : raise ValueError ( "object disposed" ) self . logger . debug ( "server started on %s:%s" , * self . sock . getsockname ( ) [ : 2 ] ) try : self . active = True self . _work ( ) except KeyboardInterrupt : self . logger . warn ( "User interrupt!" ) finally : self . active = False self . logger . debug ( "server closed" ) self . sock . close ( ) self . sock = None