parameters: (self)
return_statement: return os.path.abspath(dependency_path)
docstring: Gets the path to a downloaded version of the dependency.
  
      May not download the file if it has already been downloaded.
      Will unzip the downloaded file if a non-empty archive_info was passed in at
      init.
  
      Returns: A path to an executable that was stored in cloud_storage, or None
         if not found.
  
      Raises:
          CredentialsError: If cloud_storage credentials aren't configured.
          PermissionError: If cloud_storage credentials are configured, but not
              with an account that has permission to download the needed file.
          NotFoundError: If the needed file does not exist where expected in
              cloud_storage or the downloaded zip file.
          ServerError: If an internal server error is hit while downloading the
              needed file.
          CloudStorageError: If another error occured while downloading the remote
              path.
          FileNotFoundError: If the download was otherwise unsuccessful.
docstring_summary: Gets the path to a downloaded version of the dependency.
docstring_tokens: Gets the path to a downloaded version of the dependency .
function: def GetRemotePath(self):
      """Gets the path to a downloaded version of the dependency.
  
      May not download the file if it has already been downloaded.
      Will unzip the downloaded file if a non-empty archive_info was passed in at
      init.
  
      Returns: A path to an executable that was stored in cloud_storage, or None
         if not found.
  
      Raises:
          CredentialsError: If cloud_storage credentials aren't configured.
          PermissionError: If cloud_storage credentials are configured, but not
              with an account that has permission to download the needed file.
          NotFoundError: If the needed file does not exist where expected in
              cloud_storage or the downloaded zip file.
          ServerError: If an internal server error is hit while downloading the
              needed file.
          CloudStorageError: If another error occured while downloading the remote
              path.
          FileNotFoundError: If the download was otherwise unsuccessful.
      """
      if not self._has_minimum_data:
        return None
  
      download_dir = os.path.dirname(self._download_path)
      if not os.path.exists(download_dir):
        try:
          os.makedirs(download_dir)
        except OSError as e:
          # The logic above is racy, and os.makedirs will raise an OSError if
          # the directory exists.
          if e.errno != errno.EEXIST:
            raise
  
      dependency_path = self._download_path
      cloud_storage.GetIfHashChanged(
          self._cs_remote_path, self._download_path, self._cs_bucket,
          self._cs_hash)
      if not os.path.exists(dependency_path):
        raise exceptions.FileNotFoundError(dependency_path)
  
      if self.has_archive_info:
        dependency_path = self._archive_info.GetUnzippedPath()
      else:
        mode = os.stat(dependency_path).st_mode
        os.chmod(dependency_path, mode | stat.S_IXUSR)
      return os.path.abspath(dependency_path)
function_tokens: def GetRemotePath ( self ) : if not self . _has_minimum_data : return None download_dir = os . path . dirname ( self . _download_path ) if not os . path . exists ( download_dir ) : try : os . makedirs ( download_dir ) except OSError as e : # The logic above is racy, and os.makedirs will raise an OSError if # the directory exists. if e . errno != errno . EEXIST : raise dependency_path = self . _download_path cloud_storage . GetIfHashChanged ( self . _cs_remote_path , self . _download_path , self . _cs_bucket , self . _cs_hash ) if not os . path . exists ( dependency_path ) : raise exceptions . FileNotFoundError ( dependency_path ) if self . has_archive_info : dependency_path = self . _archive_info . GetUnzippedPath ( ) else : mode = os . stat ( dependency_path ) . st_mode os . chmod ( dependency_path , mode | stat . S_IXUSR ) return os . path . abspath ( dependency_path )