mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
[py3] Replaced basestring by six.string_types.
This commit is contained in:
@@ -10,6 +10,7 @@ from django.conf import settings
|
||||
from django.core import serializers
|
||||
from django.db import transaction, connection
|
||||
from django.test import TestCase, TransactionTestCase, Approximate
|
||||
from django.utils import six
|
||||
from django.utils import unittest
|
||||
|
||||
from .models import (Category, Author, Article, AuthorProfile, Actor, Movie,
|
||||
@@ -461,7 +462,7 @@ else:
|
||||
# yaml.safe_load will return non-string objects for some
|
||||
# of the fields we are interested in, this ensures that
|
||||
# everything comes back as a string
|
||||
if isinstance(field_value, basestring):
|
||||
if isinstance(field_value, six.string_types):
|
||||
ret_list.append(field_value)
|
||||
else:
|
||||
ret_list.append(str(field_value))
|
||||
|
||||
Reference in New Issue
Block a user