Commit 476157be authored by Thomas Heller's avatar Thomas Heller

Make the _wrap_close type (which is returned by os.popen) iterable.

This should fix the Lib\test\test_uuid.py test on Windows.
parent 85bcc66b
......@@ -664,6 +664,8 @@ class _wrap_close:
return self._proc.wait() << 8 # Shift left to match old behavior
def __getattr__(self, name):
return getattr(self._stream, name)
def __iter__(self):
return iter(self._stream)
# Supply os.fdopen() (used by subprocess!)
def fdopen(fd, mode="r", buffering=-1):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment