summaryrefslogtreecommitdiffstats
path: root/Lib/rexec.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-09-30 18:50:44 (GMT)
committerGuido van Rossum <guido@python.org>1996-09-30 18:50:44 (GMT)
commitdfd9cb1e121ea74aefea81ac18ed4fe09d1243df (patch)
tree7ede1f0cc3793a544a6cd02a304090dda30d3279 /Lib/rexec.py
parenteb76b8484dfd9307e4bbd6d6c3ad87cc6090adca (diff)
downloadcpython-dfd9cb1e121ea74aefea81ac18ed4fe09d1243df.zip
cpython-dfd9cb1e121ea74aefea81ac18ed4fe09d1243df.tar.gz
cpython-dfd9cb1e121ea74aefea81ac18ed4fe09d1243df.tar.bz2
Don't die if an ok file method (e.g. fileno) doesn't exist.
Diffstat (limited to 'Lib/rexec.py')
-rw-r--r--Lib/rexec.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/rexec.py b/Lib/rexec.py
index 76e8b40..0d1b5a1 100644
--- a/Lib/rexec.py
+++ b/Lib/rexec.py
@@ -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):