Skip to content

Commit

Permalink
chore(Server.attached_sessions): Use .filter() (#538)
Browse files Browse the repository at this point in the history
Follow up to #537
  • Loading branch information
tony authored Mar 23, 2024
2 parents 45cce80 + c5f1665 commit 99a46c8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ $ pip install --user --upgrade --pre libtmux

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

### Bug fix

- {attr}`Server.attached_sessions` fix for when multiple clients attached, thank you @patrislav1 (#537)

- #538 fix to `QueryList`.

## libtmux 0.35.0 (2024-03-17)

### Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion src/libtmux/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ def attached_sessions(self) -> t.List[Session]:
-------
list of :class:`Session`
"""
return [s for s in self.sessions if s.session_attached != "0"]
return self.sessions.filter(session_attached__noeq="1")

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

0 comments on commit 99a46c8

Please sign in to comment.