Skip to content

Commit

Permalink
method pop_disconnected() is now tolerant of devices without the *…
Browse files Browse the repository at this point in the history
…connected* attribute.
  • Loading branch information
canismarko committed Aug 12, 2024
1 parent 0aaaa93 commit 9e4f462
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ophyd-registry"
version = "1.3.0"
version = "1.3.1"
authors = [
{ name="Mark Wolfman", email="[email protected]" },
]
Expand Down
4 changes: 2 additions & 2 deletions src/ophydregistry/registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ComponentNotFound,
InvalidComponentLabel,
MultipleComponentsFound,
)
)

# Sentinal value for default parameters
UNSET = object()
Expand Down Expand Up @@ -250,7 +250,7 @@ def pop_disconnected(self, timeout: float = 0.0) -> List:
timeout_reached = False
while not timeout_reached:
# Remove any connected devices for the running list
remaining = [dev for dev in remaining if not dev.connected]
remaining = [dev for dev in remaining if not getattr(dev, "connected", True)]
if len(remaining) == 0:
# All devices are connected, so just end early.
break
Expand Down

0 comments on commit 9e4f462

Please sign in to comment.