-
Notifications
You must be signed in to change notification settings - Fork 110
Request: list_sessions
to return an empty list if 'no server running on ...'
#447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@oliverlew This issue has come up before cc: @rockandska Any thoughts on a default error, or better behavior when no server connection exists? I am +1 on having Any other ideas? We also want to make sure we don't break any APIs for existing users |
The thinking was that libtmux is a client, and would behave like
Today I am more flexible on the idea of having Caveat: that may not necessarily be the same as a client existing or not: Assuming tmux start-server The server would stay on, but return no sessions.
|
The problem is that I can't find a method to check if there is any sessions running, or tmux server running (for the current socket), without catching a
LibTmuxException
exception. It will be convenient to check that by telling whether the list is empty or not.Same goes for
sessions
andattached_sessions
attributes.It is strange/unexpected to get an exception from common tasks like accessing an attribute or requiring a list of something.
Or, a more direct solution is to add a function to check the availability of the server.
The text was updated successfully, but these errors were encountered: