def connect(self):
        """Connect to wdb server"""
        log.info('Connecting socket on %s:%d' % (self.server, self.port))
        tries = 0
        while not self._socket and tries < 10:
            try:
                time.sleep(.2 * tries)
                self._socket = Socket((self.server, self.port))
            except socket.error:
                tries += 1
                log.warning(
                    'You must start/install wdb.server '
                    '(Retrying on %s:%d) [Try #%d/10]' %
                    (self.server, self.port, tries)
                )
                self._socket = None

        if not self._socket:
            log.warning('Could not connect to server')
            return

        Wdb._sockets.append(self._socket)
        self._socket.send_bytes(self.uuid.encode('utf-8'))
def connect ( self ) : log . info ( 'Connecting socket on %s:%d' % ( self . server , self . port ) ) tries = 0 while not self . _socket and tries < 10 : try : time . sleep ( .2 * tries ) self . _socket = Socket ( ( self . server , self . port ) ) except socket . error : tries += 1 log . warning ( 'You must start/install wdb.server ' '(Retrying on %s:%d) [Try #%d/10]' % ( self . server , self . port , tries ) ) self . _socket = None if not self . _socket : log . warning ( 'Could not connect to server' ) return Wdb . _sockets . append ( self . _socket ) self . _socket . send_bytes ( self . uuid . encode ( 'utf-8' ) )
Connect to wdb server