diff --git a/django/core/serializers/__init__.py b/django/core/serializers/__init__.py index d666cd723b..005f92b693 100644 --- a/django/core/serializers/__init__.py +++ b/django/core/serializers/__init__.py @@ -67,7 +67,7 @@ def register_serializer(format, serializer_module, serializers=None): try: module = importlib.import_module(serializer_module) - except ImportError, exc: + except ImportError as exc: bad_serializer = BadSerializer(exc) module = type('BadSerializerModule', (object,), {