def is_unavailable_exception(e):
 try:
  if ((e.errcode == (-1)) or (e.headers is None)):
   return True
  exc_mess = e.headers.get('X-exception')
 except AttributeError:
  exc_mess = str(e)
 if (exc_mess and ('temporarily unavailable' in exc_mess.lower())):
  return True

def is_unavailable_exception ( e ) : try : if ( ( e . errcode == ( - 1 ) ) or ( e . headers is None ) ) : return True exc_mess = e . headers . get ( 'X-exception' ) except AttributeError : exc_mess = str ( e ) if ( exc_mess and ( 'temporarily unavailable' in exc_mess . lower ( ) ) ) : return True
returns true if the given protocolerror is the product of a server-side exception caused by the temporarily unavailable response sometimes given by operations on non-blocking sockets .