diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-07-20 14:22:00 +0200 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2012-07-22 09:29:54 +0200 |
| commit | 3cb2457f46b3e40ff6b6acffcb3fd44cbea091e5 (patch) | |
| tree | 68e43a061f1a7a122c02d5c5b39586b32959a9dc /django/core/serializers/pyyaml.py | |
| parent | cacd845996d1245f6aed257bff5f748f46206d3f (diff) | |
[py3] Replaced basestring by six.string_types.
Diffstat (limited to 'django/core/serializers/pyyaml.py')
| -rw-r--r-- | django/core/serializers/pyyaml.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/django/core/serializers/pyyaml.py b/django/core/serializers/pyyaml.py index 73e92d557f..ac0e6cf82d 100644 --- a/django/core/serializers/pyyaml.py +++ b/django/core/serializers/pyyaml.py @@ -13,6 +13,7 @@ from django.core.serializers.base import DeserializationError from django.core.serializers.python import Serializer as PythonSerializer from django.core.serializers.python import Deserializer as PythonDeserializer from django.utils.encoding import smart_str +from django.utils import six class DjangoSafeDumper(yaml.SafeDumper): @@ -53,7 +54,7 @@ def Deserializer(stream_or_string, **options): """ if isinstance(stream_or_string, bytes): stream_or_string = stream_or_string.decode('utf-8') - if isinstance(stream_or_string, basestring): + if isinstance(stream_or_string, six.string_types): stream = StringIO(stream_or_string) else: stream = stream_or_string |
