diff --git a/django/core/files/base.py b/django/core/files/base.py
index 6204d71..6a7fbc4 100644
a
|
b
|
class File(FileProxyMixin):
|
60 | 60 | chunk_size = self.DEFAULT_CHUNK_SIZE |
61 | 61 | |
62 | 62 | if hasattr(self, 'seek'): |
63 | | self.seek(0) |
64 | | # Assume the pointer is at zero... |
65 | | counter = self.size |
66 | | |
67 | | while counter > 0: |
68 | | yield self.read(chunk_size) |
69 | | counter -= chunk_size |
| 63 | try: |
| 64 | self.seek(0) |
| 65 | except IOError, e: |
| 66 | if e.errno != 29: |
| 67 | # errno 29 is illegal seek, i.e. 'self.file' is a pipe |
| 68 | # or anything else non-seekable |
| 69 | raise |
| 70 | |
| 71 | chunk = self.read(chunk_size) |
| 72 | while chunk: |
| 73 | yield chunk |
| 74 | chunk = self.read(chunk_size) |
70 | 75 | |
71 | 76 | def multiple_chunks(self, chunk_size=None): |
72 | 77 | """ |