Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #9344 -- In the `TemporaryFile` class used by Windows, proxy to…

… the wrapped file object. Thanks julien and mitsuhiko.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@10699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 304785bf26093418eb8ba8b22924696edce3b4da 1 parent 7caf21a
@gdub gdub authored
Showing with 5 additions and 6 deletions.
  1. +5 −6 django/core/files/temp.py
View
11 django/core/files/temp.py
@@ -48,12 +48,11 @@ def close(self):
def __del__(self):
self.close()
- def read(self, *args): return self.file.read(*args)
- def seek(self, offset): return self.file.seek(offset)
- def write(self, s): return self.file.write(s)
- def __iter__(self): return iter(self.file)
- def readlines(self, size=None): return self.file.readlines(size)
- def xreadlines(self): return self.file.xreadlines()
+ # Proxy to the file object.
+ def __getattr__(self, name):
+ return getattr(self.file, name)
+ def __iter__(self):
+ return iter(self.file)
NamedTemporaryFile = TemporaryFile
else:
Please sign in to comment.
Something went wrong with that request. Please try again.