diff --git a/pilot/util/container.py b/pilot/util/container.py index d5483659..d4b1c627 100644 --- a/pilot/util/container.py +++ b/pilot/util/container.py @@ -119,9 +119,11 @@ def read_output(stream, queue): if not line: break except (AttributeError, ValueError): + # Handle the case where stream is None (AttributeError) or closed (ValueError) break except OSError as e: if e.errno == errno.EBADF: + # Handle the case where the file descriptor is bad break else: raise