Skip to content

Commit 123e212

Browse files
committed
chore(Window): More resilent handling of options that return without value
1 parent aed449a commit 123e212

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/libtmux/window.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,10 @@ def show_window_options(self, g: t.Optional[bool] = False) -> "WindowOptionDict"
390390

391391
window_options: "WindowOptionDict" = {}
392392
for item in output:
393-
key, val = shlex.split(item)
393+
try:
394+
key, val = shlex.split(item)
395+
except ValueError:
396+
logger.exception(f"Error extracting option: {item}")
394397
assert isinstance(key, str)
395398
assert isinstance(val, str)
396399

0 commit comments

Comments
 (0)