File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 12
12
from django .conf import settings
13
13
from django .http import QueryDict
14
14
from django .http .multipartparser import parse_header
15
+ from django .utils import six
15
16
from django .utils .datastructures import MultiValueDict
16
17
from rest_framework import HTTP_HEADER_ENCODING
17
18
from rest_framework import exceptions
18
19
from rest_framework .compat import BytesIO
19
20
from rest_framework .settings import api_settings
21
+ import sys
20
22
21
23
22
24
def is_form_media_type (media_type ):
@@ -226,7 +228,7 @@ def user(self):
226
228
try :
227
229
self ._authenticate ()
228
230
except AttributeError as error :
229
- raise RuntimeError ( "AttributeError: " + error . message )
231
+ six . reraise ( RuntimeError , "AttributeError: " + str ( error ), sys . exc_info ()[ 2 ] )
230
232
return self ._user
231
233
232
234
@user .setter
You can’t perform that action at this time.
0 commit comments