Kaydet (Commit) dfd9cb1e authored tarafından Guido van Rossum's avatar Guido van Rossum

Don't die if an ok file method (e.g. fileno) doesn't exist.

üst eb76b848
......@@ -38,7 +38,7 @@ class FileWrapper(FileBase):
def __init__(self, f):
self.f = f
for m in self.ok_file_methods:
if not hasattr(self, m):
if not hasattr(self, m) and hasattr(f, m):
setattr(self, m, getattr(f, m))
def close(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