Skip to content
Browse files

[1.0.X]: Fixed #9344 -- In the `TemporaryFile` class used by Windows,…

… proxy to the wrapped file object. Thanks julien and mitsuhiko.

Backport of r10699 from trunk.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 899d484 commit 1b9893f991aa87062dc483cec242356804b632bb @gdub gdub committed
Showing with 5 additions and 6 deletions.
  1. +5 −6 django/core/files/
11 django/core/files/
@@ -48,12 +48,11 @@ def close(self):
def __del__(self):
- def read(self, *args): return*args)
- def seek(self, offset): return
- 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

0 comments on commit 1b9893f

Please sign in to comment.
Something went wrong with that request. Please try again.