Skip to content

Commit

Permalink
Issue 94: fix error handling (#95)
Browse files Browse the repository at this point in the history
* fix error handling after change of API

* bump the version
  • Loading branch information
jkotan authored Jun 26, 2024
1 parent 4254e4e commit 381a71f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
2024-06-26 Jan Kotanski <[email protected]>
* fix error handling after change of API
* tagged as 3.20.1

2023-08-03 Jan Kotanski <[email protected]>
* switch to argparse module
* tagged as 3.20.0
Expand Down
7 changes: 4 additions & 3 deletions nxsselector/ServerState.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,8 @@ def resetDescriptions(self):
try:
self.__command(self.__dp, "resetPreselectedComponents")
except tango.CommunicationFailed as e:
if e[-1].reason == "API_DeviceTimedOut":

if e.args and e.args[-1].reason == "API_DeviceTimedOut":
self.__wait(self.__dp)
else:
raise
Expand All @@ -831,7 +832,7 @@ def updateControllers(self):
try:
self.__command(self.__dp, "PreselectComponents")
except tango.CommunicationFailed as e:
if e[-1].reason == "API_DeviceTimedOut":
if e.args and e.args[-1].reason == "API_DeviceTimedOut":
self.__wait(self.__dp)
else:
raise
Expand Down Expand Up @@ -1090,7 +1091,7 @@ def storeData(self, name, value):
try:
self.__dp.write_attribute(name, value)
except tango.CommunicationFailed as e:
if e[-1].reason == "API_DeviceTimedOut":
if e.args and e.args[-1].reason == "API_DeviceTimedOut":
self.__wait(self.__dp)
else:
raise
Expand Down
2 changes: 1 addition & 1 deletion nxsselector/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
"""

#: (:obj:`str`) version of the application
__version__ = "3.20.0"
__version__ = "3.20.1"

0 comments on commit 381a71f

Please sign in to comment.