Skip to content

Commit 47ac9e0

Browse files
committed
getBlobEntryFirst
1 parent 41ce367 commit 47ac9e0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/DataBlobs/services/BlobEntry.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,14 @@ function getBlobEntry(var::AbstractDFGVariable, blobId::UUID)
9090
)
9191
end
9292

93-
#TODO consider changing this to use `first` as in julia's findfirst - as in findfirstBlobEntry->label::Symbol
94-
# or getBlobEntryFirst, btw this returns a vector in some other places
95-
@deprecate getBlobEntry(var::AbstractDFGVariable, key::Regex) getfirstBlobEntry(var, key)
93+
@deprecate getBlobEntry(var::AbstractDFGVariable, key::Regex) getBlobEntryFirst(var, key)
9694

95+
"""
96+
$(SIGNATURES)
97+
Finds and returns the first blob entry that matches the regex.
98+
99+
Also see: [`getBlobEntry`](@ref)
100+
"""
97101
function getBlobEntryFirst(var::AbstractDFGVariable, key::Regex)
98102
for (k,v) in var.dataDict
99103
if occursin(key, string(v.label))

src/DataBlobs/services/BlobStores.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ function getBlob(dfg::AbstractDFG, entry::BlobEntry)
9898
end
9999
throw(
100100
KeyError(
101-
"could not find $(entry.label), uuid $(entry.blobId) in any of the listed blobstores:\n $([s->getKey(s) for (s,v) in stores]))"
101+
"could not find $(entry.label), uuid $blobId) in any of the listed blobstores:\n $([s->getKey(s) for (s,v) in stores]))"
102102
)
103103
)
104104
end

0 commit comments

Comments
 (0)