1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

better missing editor message

fixes #10182
This commit is contained in:
Brian Coca 2015-02-08 23:23:30 -05:00
parent 8866378e89
commit 8b7dc6bbfb

View file

@ -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