def is_ssl_error(exc):
 if isinstance(exc, SSLError):
  return True
 else:
  args = getattr(exc, 'args', [])
  if (args and isinstance(args[0], SSLError)):
   return True
  else:
   return False

def is_ssl_error ( exc ) : if isinstance ( exc , SSLError ) : return True else : args = getattr ( exc , 'args' , [ ] ) if ( args and isinstance ( args [ 0 ] , SSLError ) ) : return True else : return False
checks if the given error is an ssl error .