_is_target_not_found_error
Return True if tmux failed because the -t target does not exist.
Source and package
- Qualified name
-
libtmux.neo ._is _target _not _found _error - Module
- libtmux.neo
- Package
- libtmux
- Source
- src/libtmux/neo.py
-
Description#
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 raisedLibTmuxException.
-
- Returns
-
bool True when the object named by
-tdoes not exist on a reachable server.