Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

[py3] Fixed file_storage tests.

  • Loading branch information...
commit 1ad05172cb5e2fafe85540e2525114843c693955 1 parent 6cb76cb
@aaugustin aaugustin authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 django/core/files/
6 django/core/files/
@@ -1,7 +1,7 @@
from __future__ import unicode_literals
import os
-from io import BytesIO
+from io import BytesIO, UnsupportedOperation
from django.utils.encoding import smart_bytes, smart_text
from django.core.files.utils import FileProxyMixin
@@ -64,8 +64,10 @@ def chunks(self, chunk_size=None):
if not chunk_size:
chunk_size = self.DEFAULT_CHUNK_SIZE
- if hasattr(self, 'seek'):
+ try:
+ except (AttributeError, UnsupportedOperation):
+ pass
while True:
data =

0 comments on commit 1ad0517

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