1
0
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:
Aymeric Augustin
2012-07-20 14:22:00 +02:00
parent cacd845996
commit 3cb2457f46
73 changed files with 230 additions and 150 deletions

View File

@@ -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))