From 96896654bd0e726375dad46b1b951fd236e3c24d Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 19 Jun 2018 10:24:43 -0400 Subject: [PATCH] added missing raise (cherry picked from commit 89f169127bead8f5a493eaf33782db2b1155425b) --- changelogs/fragments/missing_raise.yml | 2 ++ lib/ansible/inventory/manager.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/missing_raise.yml diff --git a/changelogs/fragments/missing_raise.yml b/changelogs/fragments/missing_raise.yml new file mode 100644 index 00000000000..73c8c07c843 --- /dev/null +++ b/changelogs/fragments/missing_raise.yml @@ -0,0 +1,2 @@ +bugfixes: + - added missing 'raise' to exception definition https://github.com/ansible/ansible/pull/41690 diff --git a/lib/ansible/inventory/manager.py b/lib/ansible/inventory/manager.py index 0772cff6361..b307d460827 100644 --- a/lib/ansible/inventory/manager.py +++ b/lib/ansible/inventory/manager.py @@ -375,7 +375,7 @@ class InventoryManager(object): from random import shuffle shuffle(hosts) elif order not in [None, 'inventory']: - AnsibleOptionsError("Invalid 'order' specified for inventory hosts: %s" % order) + raise AnsibleOptionsError("Invalid 'order' specified for inventory hosts: %s" % order) return hosts