File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -555,24 +555,24 @@ def _raise_for_5xx(self, response):
555
555
:param response: HTTP response object from requests
556
556
Raises :class:`requests.exceptions.HTTPError`, if a 5XX error occurred.
557
557
"""
558
- http_error_msg = ''
558
+ http_error_msg = ""
559
559
if isinstance (response .reason , bytes ):
560
560
# We attempt to decode utf-8 first because some servers
561
561
# choose to localize their reason strings. If the string
562
562
# isn't utf-8, we fall back to iso-8859-1 for all other
563
563
# encodings. (See psf/requests PR #3538)
564
564
try :
565
- reason = response .reason .decode (' utf-8' )
565
+ reason = response .reason .decode (" utf-8" )
566
566
except UnicodeDecodeError :
567
- reason = response .reason .decode (' iso-8859-1' )
567
+ reason = response .reason .decode (" iso-8859-1" )
568
568
else :
569
569
reason = response .reason
570
570
571
571
if 400 <= response .status_code < 500 :
572
572
pass # ignored
573
573
574
574
elif 500 <= response .status_code < 600 :
575
- http_error_msg = u' %s Server Error: %s for url: %s' % (
575
+ http_error_msg = " %s Server Error: %s for url: %s" % (
576
576
response .status_code , reason , response .url
577
577
)
578
578
You can’t perform that action at this time.
0 commit comments