mirror of
https://github.com/django/django.git
synced 2025-10-26 23:26:08 +00:00
Replaced cStringIO.StringIO by io.BytesIO.
Also replaced StringIO.StringIO by BytesIO in some other appropriate places. StringIO is not available in Python 3.
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import sys
|
||||
from io import BytesIO
|
||||
from threading import Lock
|
||||
try:
|
||||
from cStringIO import StringIO
|
||||
except ImportError:
|
||||
from StringIO import StringIO
|
||||
|
||||
from django import http
|
||||
from django.core import signals
|
||||
@@ -116,7 +113,7 @@ class LimitedStream(object):
|
||||
if not chunk:
|
||||
break
|
||||
self.buffer += chunk
|
||||
sio = StringIO(self.buffer)
|
||||
sio = BytesIO(self.buffer)
|
||||
if size:
|
||||
line = sio.readline(size)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user