Skip to content

Commit 3e1a9dc

Browse files
committed
chore(Server.attached_sessions): Use .filter()
1 parent 45cce80 commit 3e1a9dc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)