File tree Expand file tree Collapse file tree 8 files changed +14
-9
lines changed
src/gardenlinux/github/release_notes Expand file tree Collapse file tree 8 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ description: Installs the given GardenLinux Python library
44inputs :
55 version :
66 description : GardenLinux Python library version
7- default : " 0.10.14 "
7+ default : " 0.10.15 "
88 python_version :
99 description : Python version to setup
1010 default : " 3.13"
Original file line number Diff line number Diff line change 11[tool .poetry ]
22name = " gardenlinux"
3- version = " 0.10.14 "
3+ version = " 0.10.15 "
44description = " Contains tools to work with the features directory of gardenlinux, for example deducting dependencies from feature sets or validating cnames"
55authors = [" Garden Linux Maintainers <contact@gardenlinux.io>" ]
66license = " Apache-2.0"
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def full_name(self) -> str:
1515 def published_images_by_regions (
1616 self , image_metadata : Dict [str , Any ]
1717 ) -> Dict [str , Any ]:
18- published_image_metadata = image_metadata [ "published_image_metadata" ]
18+ published_image_metadata = image_metadata . get ( "published_image_metadata" , {})
1919 flavor_name = image_metadata ["s3_key" ].split ("/" )[- 1 ]
2020
2121 regions = []
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def full_name(self) -> str:
1313 def published_images_by_regions (
1414 self , image_metadata : Dict [str , Any ]
1515 ) -> Dict [str , Any ]:
16- published_image_metadata = image_metadata [ "published_image_metadata" ]
16+ published_image_metadata = image_metadata . get ( "published_image_metadata" , {})
1717 flavor_name = image_metadata ["s3_key" ].split ("/" )[- 1 ]
1818
1919 regions = []
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ def image_extension(self) -> str:
1616 def published_images_by_regions (
1717 self , image_metadata : Dict [str , Any ]
1818 ) -> Dict [str , Any ]:
19- published_image_metadata = image_metadata [ "published_image_metadata" ]
19+ published_image_metadata = image_metadata . get ( "published_image_metadata" , {})
2020 flavor_name = image_metadata ["s3_key" ].split ("/" )[- 1 ]
2121
2222 gallery_images = []
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ def image_extension(self) -> str:
1717 def published_images_by_regions (
1818 self , image_metadata : Dict [str , Any ]
1919 ) -> Dict [str , Any ]:
20- published_image_metadata = image_metadata [ "published_image_metadata" ]
20+ published_image_metadata = image_metadata . get ( "published_image_metadata" , {})
2121 flavor_name = image_metadata ["s3_key" ].split ("/" )[- 1 ]
2222
2323 details = {}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ def full_name(self) -> str:
1414 def published_images_by_regions (
1515 self , image_metadata : Dict [str , Any ]
1616 ) -> Dict [str , Any ]:
17- published_image_metadata = image_metadata [ "published_image_metadata" ]
17+ published_image_metadata = image_metadata . get ( "published_image_metadata" , {})
1818 flavor_name = image_metadata ["s3_key" ].split ("/" )[- 1 ]
1919
2020 regions = []
Original file line number Diff line number Diff line change 11import logging
22import re
33import textwrap
4+ from collections .abc import Mapping
45from typing import Any , Dict
56
67import requests
@@ -262,9 +263,13 @@ def release_notes_image_ids_section(metadata_files: list[str]) -> str:
262263 with open (metadata_file_path ) as f :
263264 metadata = yaml .load (f , Loader = SafeLoader )
264265
265- published_image_metadata = metadata ["published_image_metadata" ]
266+ published_image_metadata = metadata .get ("published_image_metadata" , {})
267+
266268 # Skip if no publishing metadata found
267- if published_image_metadata is None :
269+ if (
270+ not isinstance (published_image_metadata , Mapping )
271+ or len (published_image_metadata ) < 1
272+ ):
268273 continue
269274
270275 platform = metadata ["platform" ]
You can’t perform that action at this time.
0 commit comments