From 5e10424f316adfa02e34779fb1822fbbb105819a Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Tue, 19 Jun 2018 21:56:02 +0530 Subject: [PATCH] Raise Exception in virtualbox inventory plugin Signed-off-by: Abhijeet Kasurde (cherry picked from commit 37293dec3dc528979412821f7c32a0ff69508814) --- changelogs/fragments/virtualbox_inventory.yaml | 3 +++ lib/ansible/plugins/inventory/virtualbox.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/virtualbox_inventory.yaml diff --git a/changelogs/fragments/virtualbox_inventory.yaml b/changelogs/fragments/virtualbox_inventory.yaml new file mode 100644 index 00000000000..f8f099cf7d3 --- /dev/null +++ b/changelogs/fragments/virtualbox_inventory.yaml @@ -0,0 +1,3 @@ +--- +minor_changes: +- Raise AnsibleParserError which was missing previously diff --git a/lib/ansible/plugins/inventory/virtualbox.py b/lib/ansible/plugins/inventory/virtualbox.py index 9ec1aedfa6d..684e302c73d 100644 --- a/lib/ansible/plugins/inventory/virtualbox.py +++ b/lib/ansible/plugins/inventory/virtualbox.py @@ -250,7 +250,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): try: p = Popen(cmd, stdout=PIPE) except Exception as e: - AnsibleParserError(to_native(e)) + raise AnsibleParserError(to_native(e)) source_data = p.stdout.read().splitlines()