mirror of
https://github.com/django/django.git
synced 2025-10-26 07:06: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:
@@ -6,6 +6,7 @@ be executed through ``django-admin.py`` or ``manage.py``).
|
||||
import os
|
||||
import sys
|
||||
|
||||
from io import BytesIO
|
||||
from optparse import make_option, OptionParser
|
||||
import traceback
|
||||
|
||||
@@ -258,11 +259,7 @@ class BaseCommand(object):
|
||||
|
||||
"""
|
||||
from django.core.management.validation import get_validation_errors
|
||||
try:
|
||||
from cStringIO import StringIO
|
||||
except ImportError:
|
||||
from StringIO import StringIO
|
||||
s = StringIO()
|
||||
s = BytesIO()
|
||||
num_errors = get_validation_errors(s, app)
|
||||
if num_errors:
|
||||
s.seek(0)
|
||||
|
||||
Reference in New Issue
Block a user