Commit 1f56e4e1 authored by Jason Madden's avatar Jason Madden

some wrappers don't have the mode attribute.

parent ad6b13cc
......@@ -143,7 +143,7 @@ class FileObjectThread(FileObjectBase):
def _do_delegate_methods(self):
super(FileObjectThread, self)._do_delegate_methods()
if not hasattr(self, 'read1') and 'r' in self._io.mode:
if not hasattr(self, 'read1') and 'r' in getattr(self._io, 'mode', ''):
self.read1 = self.read
def _extra_repr(self):
......
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