We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d49f060 commit 99109cfCopy full SHA for 99109cf
src/libtmux/server.py
@@ -246,22 +246,7 @@ def attached_sessions(self) -> t.List[Session]:
246
-------
247
list of :class:`Session`
248
"""
249
- try:
250
- sessions = self.sessions
251
- attached_sessions = []
252
-
253
- for session in sessions:
254
- attached = session.session_attached
255
- # for now session_active is a unicode
256
- if attached != "0":
257
- logger.debug(f"session {session.name} attached")
258
- attached_sessions.append(session)
259
- else:
260
- continue
261
262
- except Exception:
263
- return []
264
- return attached_sessions
+ return self.sessions.filter(session_attached="1")
265
266
def has_session(self, target_session: str, exact: bool = True) -> bool:
267
"""Return True if session exists.
0 commit comments