From 8b7dc6bbfbb66fbead414297b282abc5fda8645e Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sun, 8 Feb 2015 23:23:30 -0500 Subject: [PATCH] better missing editor message fixes #10182 --- lib/ansible/utils/vault.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/utils/vault.py b/lib/ansible/utils/vault.py index 66f18d5c9ba..3622b500b15 100644 --- a/lib/ansible/utils/vault.py +++ b/lib/ansible/utils/vault.py @@ -203,7 +203,10 @@ class VaultEditor(object): self.write_data(existing_data, tmp_path) # drop the user into an editor on the tmp file - call(self._editor_shell_command(tmp_path)) + try: + call(self._editor_shell_command(tmp_path)) + except OSError, e: + raise Exception("Failed to open editor (%s): %s" % (self._editor_shell_command(tmp_path)[0],str(e))) tmpdata = self.read_data(tmp_path) # create new vault