Skip to content

Commit

Permalink
Make Config optional
Browse files Browse the repository at this point in the history
  • Loading branch information
tkopecek committed Dec 12, 2024
1 parent 9e0b82e commit 0e7bc41
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions mock/py/mockbuild/podman.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand All @@ -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)
Expand Down

0 comments on commit 0e7bc41

Please sign in to comment.