(self, url, fp, errcode, errmsg, headers, data=None)
return self.http_error_default(url, fp, errcode, errmsg, headers)
Handle http errors.

        Derived class can override this, or provide specific handlers
        named http_error_DDD where DDD is the 3-digit error code.
Handle http errors.
Handle http errors .
def http_error(self, url, fp, errcode, errmsg, headers, data=None):
        """Handle http errors.

        Derived class can override this, or provide specific handlers
        named http_error_DDD where DDD is the 3-digit error code."""
        # First check if there's a specific handler for this error
        name = 'http_error_%d' % errcode
        if hasattr(self, name):
            method = getattr(self, name)
            if data is None:
                result = method(url, fp, errcode, errmsg, headers)
            else:
                result = method(url, fp, errcode, errmsg, headers, data)
            if result: return result
        return self.http_error_default(url, fp, errcode, errmsg, headers)
def http_error ( self , url , fp , errcode , errmsg , headers , data = None ) : # First check if there's a specific handler for this error name = 'http_error_%d' % errcode if hasattr ( self , name ) : method = getattr ( self , name ) if data is None : result = method ( url , fp , errcode , errmsg , headers ) else : result = method ( url , fp , errcode , errmsg , headers , data ) if result : return result return self . http_error_default ( url , fp , errcode , errmsg , headers )