mirror of
https://github.com/ansible/awx.git
synced 2026-03-09 05:29:26 -02:30
Fix sanity errors for collections
This commit is contained in:
@@ -72,6 +72,7 @@ from ansible.errors import AnsibleParserError, AnsibleOptionsError
|
||||
from ansible.plugins.inventory import BaseInventoryPlugin
|
||||
from ansible.config.manager import ensure_type
|
||||
|
||||
from ansible.module_utils.six import raise_from
|
||||
from ..module_utils.controller_api import ControllerAPIModule
|
||||
|
||||
|
||||
@@ -130,9 +131,9 @@ class InventoryModule(BaseInventoryPlugin):
|
||||
try:
|
||||
inventory_id = ensure_type(inventory_id, 'str')
|
||||
except ValueError as e:
|
||||
raise AnsibleOptionsError(
|
||||
raise_from(AnsibleOptionsError(
|
||||
'Invalid type for configuration option inventory_id, ' 'not integer, and cannot convert to string: {err}'.format(err=to_native(e))
|
||||
) from e
|
||||
), e)
|
||||
inventory_id = inventory_id.replace('/', '')
|
||||
inventory_url = '/api/v2/inventories/{inv_id}/script/'.format(inv_id=inventory_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user