For the time when the command is running, the timeout is 10s.  If you think that should be raised, feel free to do so. But once we get to the final else (where my comma is), we've gotten a message from proc.wait() that the command exited normally and returned a 0 return_code.  So we know that whatever is left in the queue is all that will ever be, so we can safely reduce our timeout to check to see if a race condition caused a few pieces of output to be left in the queue.