Skip to content

Commit 29b4abd

Browse files
committed
chore: Optimize condition
1 parent 1308cb5 commit 29b4abd

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/tmuxp/util.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,10 @@ def run_before_script(
5353
return_code = proc.poll()
5454

5555
# Read one line from stdout, if available
56-
if proc.stdout:
57-
line_out = proc.stdout.readline()
58-
else:
59-
line_out = ""
56+
line_out = proc.stdout.readline() if proc.stdout else ""
6057

6158
# Read one line from stderr, if available
62-
if proc.stderr:
63-
line_err = proc.stderr.readline()
64-
else:
65-
line_err = ""
59+
line_err = proc.stderr.readline() if proc.stderr else ""
6660

6761
if line_out:
6862
out_buffer.append(line_out)

0 commit comments

Comments
 (0)