def UpgradeToOAuthAccessToken(self, authorized_request_token=None,
                                request_url='%s/accounts/OAuthGetAccessToken' \
                                % AUTH_SERVER_HOST, oauth_version='1.0',
                                oauth_verifier=None):
    if (authorized_request_token and
        not isinstance(authorized_request_token, gdata.auth.OAuthToken)):
      raise NonOAuthToken
    if not authorized_request_token:
      if isinstance(self.current_token, gdata.auth.OAuthToken):
        authorized_request_token = self.current_token
      else:
        current_scopes = lookup_scopes(self.service)
        if current_scopes:
          token = self.token_store.find_token(current_scopes[0])
          if isinstance(token, gdata.auth.OAuthToken):
            authorized_request_token = token
    if not authorized_request_token:
      raise NonOAuthToken
    access_token_url = gdata.auth.GenerateOAuthAccessTokenUrl(
        authorized_request_token,
        self._oauth_input_params,
        access_token_url=request_url,
        oauth_version=oauth_version,
        oauth_verifier=oauth_verifier)
    response = self.http_client.request('GET', str(access_token_url))
    if response.status == 200:
      token = gdata.auth.OAuthTokenFromHttpBody(response.read())
      token.scopes = authorized_request_token.scopes
      token.oauth_input_params = authorized_request_token.oauth_input_params
      self.SetOAuthToken(token)
      return token
    else:
      raise TokenUpgradeFailed({'status': response.status,
                                'reason': 'Non 200 response on upgrade',
                                'body': response.read()})
Reopening a file with tables using enumerated multi-dimensional
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/service.py/GDataService.UpgradeToOAuthAccessToken--crossover with--dataset/ETHPy150Open PyTables/PyTables/tables/tests/test_enum.py/EnumTableTestCase.test00b_reopenMD