Skip to content

Commit

Permalink
Make checkpresent verify existence of a usable URL (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
matrss authored Apr 15, 2024
1 parent af3d770 commit c8a609f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/datalad_cds/cds_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ def whereis(self, key: str) -> str:
return datalad_cds.spec.Spec.from_url(url).to_json()

def checkpresent(self, key: str) -> bool:
# We just assume that we can always handle the key
return True
urls = self.annex.geturls(key, "cds:")
return len(urls) > 0

def claimurl(self, url: str) -> bool:
return url.startswith("cds:")
Expand Down

0 comments on commit c8a609f

Please sign in to comment.