def _GetCredentials(self):
    """Return appropriate credentials if we are running in a GCE environment.

    Returns:
      AppAssertionCredentials if we are running on GCE, None if not.

    Raises:
      RuntimeError: The user has requested authentication for a service account
        but the environment is not correct for that to work.
    """
    if self.options.authenticate_service_account:



      url = (METADATA_BASE, SERVICE_ACCOUNT_BASE) % '%s/%s/scopes'
      try:
        vm_scopes_string = self.read_url_contents(url)
      except urllib2.URLError, e:
        raise RuntimeError('Could not obtain scope list from metadata service: '
                           '%s: %s. This may be because we are not running in '
                           'a Google Compute Engine VM.' % (url, e))
      vm_scopes = vm_scopes_string.split()
      missing = list(set(self.oauth_scopes).difference(vm_scopes))
      if missing:
        raise RuntimeError('Required scopes %s missing from %s. '
                           'This VM instance probably needs to be recreated '
                           'with the missing scopes.' % (missing, vm_scopes))
      return oauth2client_gce.AppAssertionCredentials()
    else:
      return None
dataset/ETHPy150Open GoogleCloudPlatform/python-compat-runtime/appengine-compat/exported_appengine_sdk/google/appengine/tools/appcfg.py/AppCfgApp._GetCredentials/swapped operands of `%`