PLAT-1915 Stop using deprecated BaseException.message

This commit is contained in:
Jeremy Bowman
2018-01-31 14:16:42 -05:00
parent daaeb6b8fe
commit 5289c7e828
87 changed files with 255 additions and 180 deletions

View File

@@ -7,6 +7,7 @@ from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
from rest_framework.generics import ListAPIView
from rest_framework.response import Response
from six import text_type
from openedx.core.lib.api.view_utils import DeveloperErrorViewMixin, view_auth_classes
from xmodule.modulestore.django import modulestore
@@ -215,7 +216,7 @@ class BlocksView(DeveloperErrorViewMixin, ListAPIView):
)
)
except ItemNotFoundError as exception:
raise Http404("Block not found: {}".format(exception.message))
raise Http404("Block not found: {}".format(text_type(exception)))
@view_auth_classes()