Skip to content

Commit b927af1

Browse files
committed
dart: fix keyerror on deletion on keys
Signed-off-by: Shengqi Chen <[email protected]>
1 parent d7fb8b7 commit b927af1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pub-mirror.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ def handle_pkg(
111111

112112
for ver in resp["versions"]:
113113
logger.debug(f'Checking {pkg_name}=={ver["version"]}')
114-
del ver["advisoriesUpdated"] # not supported
114+
if "advisoriesUpdated" in ver:
115+
del ver["advisoriesUpdated"] # not supported
115116
if ver.get("retracted", False):
116117
logger.info(f'Skipping retracted version {pkg_name}=={ver["version"]}')
117118
dst_file = working_dir / "packages" / pkg_name / "versions" / f'{ver["version"]}.tar.gz'

0 commit comments

Comments
 (0)