diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2024-01-03 21:25:08 +0300 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2024-01-03 21:25:08 +0300 |
commit | 48dafae913459780cb081c8c31191ecbaf6b26f0 (patch) | |
tree | 179b887e9524260334120b4322e802bfdff6e105 | |
parent | 6103afd483abd1bd482eeaa00e999e6fe1a9ca2a (diff) |
Avoid an exception if package.merge() fails and returns None
-rwxr-xr-x | calm/calm.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/calm/calm.py b/calm/calm.py index e092468..c0926e0 100755 --- a/calm/calm.py +++ b/calm/calm.py @@ -343,6 +343,11 @@ def _process_maintainer_uploads(scan_result, args, state, all_packages, m, based # remove files which are to be removed scan_result[arch].to_vault.map(lambda p, f: package.delete(merged_packages[arch], p, f)) + # if an error occurred ... + if not valid: + # ... discard move list and merged_packages + return False + # validate the package set state.valid_provides = db.update_package_names(args, merged_packages) for arch in common_constants.ARCHES: |