Allow DontReadFromInput to produce iterator without error. Fixes #3314.
This commit is contained in:
parent
3c3fc3bb9d
commit
2f47624b19
|
@ -574,7 +574,10 @@ class DontReadFromInput(object):
|
|||
raise IOError("reading from stdin while output is captured")
|
||||
readline = read
|
||||
readlines = read
|
||||
__iter__ = read
|
||||
__next__ = read
|
||||
|
||||
def __iter__(self):
|
||||
return self
|
||||
|
||||
def fileno(self):
|
||||
raise UnsupportedOperation("redirected stdin is pseudofile, "
|
||||
|
|
Loading…
Reference in New Issue