restore compat with libtmux < 0.17 (#75452)

This commit is contained in:
Emmanuel Cazenave 2023-03-15 14:27:43 +01:00
parent 9882ce8037
commit f2e1d878c2
1 changed files with 5 additions and 1 deletions

View File

@ -391,7 +391,11 @@ else:
return cluster_name
tmux = libtmux.Server()
session = tmux.sessions.get(session_name=tmux_session_name)
try:
session = tmux.sessions.get(session_name=tmux_session_name)
except AttributeError:
session = tmux.find_where({'session_name': tmux_session_name})
status_window = session.attached_window