From 65d3b167e69326bedfcee8cd8c0e15c2571d9310 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 14 Jan 2015 17:22:05 -0500 Subject: [PATCH] now captures cache fetch failures --- lib/ansible/modules/packaging/os/apt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/modules/packaging/os/apt.py b/lib/ansible/modules/packaging/os/apt.py index ad1807f9c2..9f5b8fd4cd 100644 --- a/lib/ansible/modules/packaging/os/apt.py +++ b/lib/ansible/modules/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 *