diff --git a/mock/py/mockbuild/podman.py b/mock/py/mockbuild/podman.py index c7e84ea04..fa6479012 100644 --- a/mock/py/mockbuild/podman.py +++ b/mock/py/mockbuild/podman.py @@ -135,8 +135,6 @@ def get_layers_digest(self): except json.JSONDecodeError as exc: raise BootstrapError(f"The manifest data of {self.image} " "are not json-formatted.") from exc - if 'Config' not in data: - raise BootstrapError(f"Config section of {self.image} is missing.") if 'RootFS' not in data: raise BootstrapError(f"RootFS section of {self.image} is missing.") if data['RootFS']['Type'] != 'layers': @@ -145,7 +143,7 @@ def get_layers_digest(self): # data which should be sufficient to confirm the image data = { 'RootFS': data['RootFS'], - 'Config': data['Config'], + 'Config': data.get('Config'), } # convert to json string with ordered dicts and create hash data = json.dumps(data, sort_keys=True)