Kaydet (Commit) c83b6299 authored tarafından Christian Heimes's avatar Christian Heimes

iter() doesn't use __getattr__ to find an __iter__ method. I'm not sure if the…

iter() doesn't use __getattr__ to find an __iter__ method. I'm not sure if the behavior is deliberately but this workaround fixes the issue for the next alpha release tomorrow.
üst e1feb2eb
......@@ -394,6 +394,10 @@ class _TemporaryFileWrapper:
self.file.__enter__()
return self
# XXX iter() doesn't use __getattr__ to find the __iter__ method
def __iter__(self):
return self.__getattr__('__iter__')()
# NT provides delete-on-close as a primitive, so we don't need
# the wrapper to do anything special. We still use it so that
# file.name is useful (i.e. not "(fdopen)") with NamedTemporaryFile.
......
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