shards.py: return on empty shard.yml

This commit is contained in:
Anna “CyberTailor” 2023-07-04 19:54:50 +05:00
parent 8a1d0dfc58
commit 99d5907926
Signed by: CyberTaIlor
GPG Key ID: E7B76EDC50864BB1
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ class ShardsGenerator(AbstractGenerator):
def update_metadata_xml(self, mxml: MetadataXML) -> None:
with open(self.shard_yml) as file:
if (shard := yaml.load(file, CLoader)) is None:
shard = {}
return
for author in map(extract_name_email, shard.get("authors", [])):
if author is None: