def _GetOpener(self, url, username=None, password=None):
    if username or password:
      self._AddAuthorizationHeader(username, password)
      handler = self._urllib.HTTPBasicAuthHandler()
      (scheme, netloc, path, params, query, fragment) = urlparse.urlparse(url)
      handler.add_password(Api._API_REALM, netloc, username, password)
      opener = self._urllib.build_opener(handler)
    else:
      opener = self._urllib.build_opener()
    opener.addheaders = self._request_headers.items()
    return opener
dataset/ETHPy150Open livid/v2ex/twitter/twitter.py/Api._GetOpener/operator `and` -> `or`