summaryrefslogtreecommitdiff
path: root/buildstream/_ostree.py
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2018-04-19 08:35:44 +0200
committerJürg Billeter <j@bitron.ch>2018-05-11 08:01:12 +0200
commitb78df1e2c546236d7c6166f293d7838df887f70f (patch)
tree591401459d73797ac98dad51de526dec3a3ae364 /buildstream/_ostree.py
parent6ba62c578c8ab8efcbe8f3d2bd2d456a975f1c1b (diff)
downloadbuildstream-b78df1e2c546236d7c6166f293d7838df887f70f.tar.gz
_ostree.py: Remove unused function list_remote_refs()
Diffstat (limited to 'buildstream/_ostree.py')
-rw-r--r--buildstream/_ostree.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/buildstream/_ostree.py b/buildstream/_ostree.py
index ab62f6c7d..dfa7567de 100644
--- a/buildstream/_ostree.py
+++ b/buildstream/_ostree.py
@@ -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