Null check for meta in meta_mounts (#4326)

This commit is contained in:
Mike Degatano 2023-05-31 10:50:28 -04:00 committed by GitHub
parent 1feda7d89f
commit b86a6d292f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,6 +114,8 @@ class DockerInterface(CoreSysAttributes):
@property @property
def meta_mounts(self) -> list[dict[str, Any]]: def meta_mounts(self) -> list[dict[str, Any]]:
"""Return meta data of mounts for container/image.""" """Return meta data of mounts for container/image."""
if not self._meta:
return []
return self._meta.get("Mounts", []) return self._meta.get("Mounts", [])
@property @property