Skip to content

Request: list_sessions to return an empty list if 'no server running on ...' #447

Closed
@xlucn

Description

@xlucn

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 and attached_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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions