Skip to content

Commit 50164f5

Browse files
ckt114tony
authored andcommitted
Refactoring.
1 parent 130dc36 commit 50164f5

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/libtmux/session.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,8 @@ def new_window(
250250
window_args += (
251251
'-F"%s"' % formats.FORMAT_SEPARATOR.join(tmux_formats),
252252
) # output
253-
if window_name:
254-
window_args += ("-n%s" % window_name,)
255-
256-
if window_name == '':
257-
window_args += ('-n', '')
253+
if window_name is not None and isinstance(window_name, str):
254+
window_args += ("-n", window_name)
258255

259256
window_args += (
260257
# empty string for window_index will use the first one available

0 commit comments

Comments
 (0)