sources/containers-storage: fix load caching
storage_conf was never not None, so the loading was called every time. This never crashed because conf was always being set, but it wasn't working properly regardless.
This commit is contained in:
parent
af913d91f4
commit
6ba0561187
1 changed files with 4 additions and 4 deletions
|
|
@ -49,10 +49,10 @@ class ContainersStorageSource(sources.SourceService):
|
|||
Construct the full image name that references an image with a given checksum in the local storage.
|
||||
"""
|
||||
if self.storage_conf is None:
|
||||
conf = host.get_container_storage()
|
||||
driver = conf["storage"]["driver"]
|
||||
graphroot = conf["storage"]["graphroot"]
|
||||
runroot = conf["storage"]["runroot"]
|
||||
self.storage_conf = host.get_container_storage()
|
||||
driver = self.storage_conf["storage"]["driver"]
|
||||
graphroot = self.storage_conf["storage"]["graphroot"]
|
||||
runroot = self.storage_conf["storage"]["runroot"]
|
||||
|
||||
return f"containers-storage:[{driver}@{graphroot}+{runroot}]{imagename}"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue