mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Make the _wrap_close type (which is returned by os.popen) iterable.
This should fix the Lib\test\test_uuid.py test on Windows.
This commit is contained in:
parent
85bcc66bb4
commit
476157bea5
1 changed files with 2 additions and 0 deletions
|
|
@ -664,6 +664,8 @@ def close(self):
|
|||
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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue