def ignore_error(error):
 (e_type, e_value, e_tb) = error
 return (issubclass(e_type, socket.error) and (e_value[0] in (errno.ECONNRESET, errno.EPIPE)))

def ignore_error ( error ) : ( e_type , e_value , e_tb ) = error return ( issubclass ( e_type , socket . error ) and ( e_value [ 0 ] in ( errno . ECONNRESET , errno . EPIPE ) ) )
check whether this error is safe to ignore .