Skip to content

Commit

Permalink
FIX: patch over issue 565
Browse files Browse the repository at this point in the history
  • Loading branch information
klauer committed Aug 14, 2023
1 parent be1a7b7 commit f23dfa1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
23 changes: 23 additions & 0 deletions docs/source/upcoming_release_notes/565-poslimits.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
565 poslimits
#############

API Changes
-----------
- N/A

Features
--------
- N/A

Bugfixes
--------
- Avoid uncaught ``TypeError`` when ``None`` is present in a positioner
``.limits``.

Maintenance
-----------
- N/A

Contributors
------------
- klauer
6 changes: 5 additions & 1 deletion typhos/positioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,11 @@ def _link_limits_by_limits_attr(self):
except Exception:
...
else:
if low_limit < high_limit:
if low_limit is None or high_limit is None:
# Some devices may erroneously report `None` limits.
# TyphosPositioner will hide the limit labels in this scenario.
...
elif low_limit < high_limit:
self.ui.low_limit.setText(str(low_limit))
self.ui.high_limit.setText(str(high_limit))
return
Expand Down

0 comments on commit f23dfa1

Please sign in to comment.