Commit b78df1e2 authored by Jürg Billeter's avatar Jürg Billeter

_ostree.py: Remove unused function list_remote_refs()

parent 6ba62c57
......@@ -516,23 +516,3 @@ def configure_remote(repo, remote, url, key_url=None):
repo.remote_gpg_import(remote, stream, None, 0, None)
except GLib.GError as e:
raise OSTreeError("Failed to add gpg key from url '{}': {}".format(key_url, e.message)) from e
# list_remote_refs():
#
# Fetch list of refs from a remote.
#
# Args:
# repo (OSTree.Repo): The repo
# remote (str): An optional remote name, defaults to 'origin'
#
# Returns:
# (dict): A dict of refs to checksums.
#
def list_remote_refs(repo, remote="origin"):
try:
_, refs = repo.remote_list_refs(remote)
return refs
except GLib.GError as e:
(_, remote_url) = repo.remote_get_url(remote)
raise OSTreeError(message="{} when attempting to fetch from {}".format(e.message, remote_url)) from e
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment