From 24b0db98ffcb75bf317d174e19e7b9620341ed48 Mon Sep 17 00:00:00 2001 From: gpulido Date: Thu, 18 Jul 2024 00:49:40 +0200 Subject: [PATCH] fix: lock acquire --- selve/__init__.py | 5 ++--- setup.py | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/selve/__init__.py b/selve/__init__.py index 85402dd..3766d8d 100644 --- a/selve/__init__.py +++ b/selve/__init__.py @@ -66,7 +66,7 @@ def executeCommand(self, command): _LOGGER.info('Gateway writting: ' + str(commandstr)) try: - self.lock.adquire() + self.lock.acquire() self.configserial() if self.ser.isOpen(): @@ -83,8 +83,7 @@ def executeCommand(self, command): _LOGGER.info('read data: ' + response_str) if response.decode() == '': break - - self.ser.close() + self.ser.close() _LOGGER.info('read data: ' + response_str) return process_response(response_str) except Exception as e1: diff --git a/setup.py b/setup.py index 0129fd2..189e4a8 100644 --- a/setup.py +++ b/setup.py @@ -15,7 +15,7 @@ setup( name='python-selve', # Required - version='1.4.0', # Required + version='1.4.1', # Required description='Python library for interfacing with selve devices using the USB-RF controller', # Required long_description=long_description, # Optional url='https://github.com/gpulido/python-selve', # Optional