diff --git a/packaging/os/apt.py b/packaging/os/apt.py index ad1807f9c20..9f5b8fd4cda 100644 --- a/packaging/os/apt.py +++ b/packaging/os/apt.py @@ -619,6 +619,8 @@ def main(): except apt.cache.LockFailedException: module.fail_json(msg="Failed to lock apt for exclusive operation") + except apt.cache.FetchFailedException: + module.fail_json(msg="Could not fetch updated apt files") # import module snippets from ansible.module_utils.basic import *