Skip to content

Commit a3a8b33

Browse files
authored
minor code style improvement in run_shell_cmd to enable non-blocking reads on input/output channels
1 parent d509595 commit a3a8b33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

easybuild/tools/run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,9 @@ def to_cmd_str(cmd):
508508

509509
if stream_output or qa_patterns:
510510
# enable non-blocking access to stdout, stderr, stdin
511-
channels = [channel for channel in (proc.stdout, proc.stdin, proc.stderr) if channel is not None]
512-
for channel in channels:
513-
os.set_blocking(channel.fileno(), False)
511+
for channel in (proc.stdout, proc.stdin, proc.stderr):
512+
if channel is not None:
513+
os.set_blocking(channel.fileno(), False)
514514

515515
if stdin:
516516
proc.stdin.write(stdin)

0 commit comments

Comments
 (0)