On this page
libtmux.neo._is_target_not_found_error
- Module
- libtmux.neo
- Package
- libtmux
- Source
- src/libtmux/neo.py
-
Return True if tmux failed because the
-ttarget does not exist.A live tmux server rejects an unknown target with
can't find <kind>: <target>on stderr (cmd_find_targetin tmux'scmd-find.c), for every object kind and every supported tmux version. Every *other* failure -- a stopped daemon, a missing socket, a permission error -- says something else, and stays aLibTmuxException.This is the mirror image of
libtmux.server._is_daemon_not_up_error: together they answer "is the object gone, or is the server gone?" from the same stderr text.Examples
>>> from libtmux.neo import _is_target_not_found_error >>> _is_target_not_found_error("can't find pane: %99") True >>> _is_target_not_found_error("can't find window: @99") True >>> _is_target_not_found_error("can't find session: $99") TrueA server that isn't there is a different answer:
>>> _is_target_not_found_error("no server running on /tmp/tmux-1000/default") False >>> _is_target_not_found_error( ... "error connecting to /tmp/tmux-1000/nope (No such file or directory)" ... ) False- Parameters
-
-
stderr_text ( str ) – tmux's stderr, as carried by the raised
LibTmuxException.
-
- Returns
-
bool True when the object named by
-tdoes not exist on a reachable server.
0 declared, 0 inherited