Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
delay=config.retry.delay,
factor=config.retry.factor,
exceptions=_RETRY_EXCEPTIONS)
def read(self):
try:
return self.socket.recv()
except:
logger.exception('read error')
return ''
delay=config.retry.delay,
factor=config.retry.factor,
exceptions=_RETRY_EXCEPTIONS)
def release(self):
if self.socket is not None:
self.socket.shutdown(socket.SHUT_RDWR)
self.socket.close()
self.socket = None
max_tries=config.retry.max_tries,
delay=config.retry.delay,
factor=config.retry.factor,
exceptions=_RETRY_EXCEPTIONS)
def read(self):
try:
return self.socket.recv()
except:
logger.exception('read error')
return ''
factor=config.retry.factor,
exceptions=_RETRY_EXCEPTIONS)
def read(self):
try:
return self.socket.recv()
except:
logger.exception('read error')
return ''
factor=config.retry.factor,
exceptions=_RETRY_EXCEPTIONS)
def release(self):
return self._raw_release()
max_tries=config.retry.max_tries,
delay=config.retry.delay,
factor=config.retry.factor,
exceptions=_RETRY_EXCEPTIONS)
def catch(self):
self.socket = bluetooth.BluetoothSocket(bluetooth.RFCOMM)
self.socket.connect((self.address, self.port))
max_tries=config.retry.max_tries,
delay=config.retry.delay,
factor=config.retry.factor,
exceptions=_RETRY_EXCEPTIONS)
def write(self, data):
return self._raw_write(data)
delay=config.retry.delay,
factor=config.retry.factor,
exceptions=_RETRY_EXCEPTIONS)
def read(self):
return self._raw_read()