Skip to content

Commit 99a46c8

Browse files
authored
chore(Server.attached_sessions): Use .filter() (#538)
Follow up to #537
2 parents 45cce80 + c5f1665 commit 99a46c8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

CHANGES

+6
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ $ pip install --user --upgrade --pre libtmux
1515

1616
<!-- To maintainers and contributors: Please add notes for the forthcoming version above -->
1717

18+
### Bug fix
19+
20+
- {attr}`Server.attached_sessions` fix for when multiple clients attached, thank you @patrislav1 (#537)
21+
22+
- #538 fix to `QueryList`.
23+
1824
## libtmux 0.35.0 (2024-03-17)
1925

2026
### Breaking changes

src/libtmux/server.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def attached_sessions(self) -> t.List[Session]:
260260
-------
261261
list of :class:`Session`
262262
"""
263-
return [s for s in self.sessions if s.session_attached != "0"]
263+
return self.sessions.filter(session_attached__noeq="1")
264264

265265
def has_session(self, target_session: str, exact: bool = True) -> bool:
266266
"""Return True if session exists.

0 commit comments

Comments
 (0)