From 20fb9f8e965f391d494c81f0161d14bb8d4a2d2f Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Fri, 18 Mar 2016 05:52:53 -0700 Subject: [PATCH] Catch ValueError as well because of El Capitan provoking a bug in python2's subprocess Fixes #14895 --- lib/ansible/parsing/vault/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/ansible/parsing/vault/__init__.py b/lib/ansible/parsing/vault/__init__.py index 8ea80d1b07a..8635da52bff 100644 --- a/lib/ansible/parsing/vault/__init__.py +++ b/lib/ansible/parsing/vault/__init__.py @@ -275,8 +275,12 @@ class VaultEditor: try: r = call(['shred', tmp_path]) - except OSError: + except (OSError, ValueError): # shred is not available on this system, or some other error occured. + # ValueError caught because OS X El Capitan is raising an + # exception big enough to hit a limit in python2-2.7.11 and below. + # Symptom is ValueError: insecure pickle when shred is not + # installed there. r = 1 if r != 0: