Пример #1
0
 def http_error_default(self, url, fp, errcode, errmsg, headers):
     if errcode == 404:
         raise HTTPError(url, errcode, errmsg, headers, fp)
     else:
         FancyURLopener.http_error_default(url, fp, errcode, errmsg, headers)
Пример #2
0
 def http_error_default(self, url, fp, errcode, errmsg, headers):
     if errcode == 404:
         raise HTTPError(url, errcode, errmsg, headers, fp)
     else:
         FancyURLopener.http_error_default(url, fp, errcode, errmsg,
                                           headers)
Пример #3
0
 def http_error_default(self, url, fp, errorcode, errmsg, headers):
     if errorcode >= 400:
         raise HTTPError(str(errorcode) + ': ' + errmsg)
     else:
         FancyURLopener.http_error_default(self, url, fp, errorcode, errmsg, headers)