You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/10/27 22:35:53 UTC

[GitHub] [airflow] punx120 commented on a diff in pull request #27184: SSHOperator ignores cmd_timeout (#27182)

punx120 commented on code in PR #27184:
URL: https://github.com/apache/airflow/pull/27184#discussion_r1007434797


##########
airflow/providers/ssh/hooks/ssh.py:
##########
@@ -491,9 +491,12 @@ def exec_ssh_client_command(
         if stdout_buffer_length > 0:
             agg_stdout += stdout.channel.recv(stdout_buffer_length)
 
+        timedout = False
+
         # read from both stdout and stderr
         while not channel.closed or channel.recv_ready() or channel.recv_stderr_ready():
             readq, _, _ = select([channel], [], [], timeout)
+            timedout = len(readq) == 0

Review Comment:
   I'm not sure - from `select` doc
   ```
   the return value is a tuple of three lists corresponding to the first three arguments; 
   each contains the subset of the corresponding file descriptors that are ready.
   ```
   and we pass empty list to 2nd and 3rd args.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org