Skip to content

Commit

Permalink
fix: lock acquire
Browse files Browse the repository at this point in the history
  • Loading branch information
gpulido committed Jul 17, 2024
1 parent c7b6dda commit 24b0db9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions selve/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 24b0db9

Please sign in to comment.