diff --git a/lib/ansible/module_utils/network/fortimanager/fortimanager.py b/lib/ansible/module_utils/network/fortimanager/fortimanager.py index fa6c21e933..5a3875c236 100644 --- a/lib/ansible/module_utils/network/fortimanager/fortimanager.py +++ b/lib/ansible/module_utils/network/fortimanager/fortimanager.py @@ -39,19 +39,23 @@ try: except ImportError: HAS_PYFMGR = False -# check for debug lib -try: - from ansible.module_utils.network.fortimanager.fortimanager_debug import debug_dump - HAS_FMGR_DEBUG = True -except ImportError: - HAS_FMGR_DEBUG = False +# ACTIVE BUG WITH OUR DEBUG IMPORT CALL -- BECAUSE IT'S UNDER MODULE_UTILITIES +# WHEN module_common.recursive_finder() runs under the module loader, it looks for this namespace debug import +# and because it's not there, it always fails, regardless of it being under a try/catch here. +# we're going to move it to a different namespace. +# # check for debug lib +# try: +# from ansible.module_utils.network.fortimanager.fortimanager_debug import debug_dump +# HAS_FMGR_DEBUG = True +# except: +# HAS_FMGR_DEBUG = False # BEGIN HANDLER CLASSES class FortiManagerHandler(object): - def __init__(self, conn, check_mode=False): + def __init__(self, conn, module): self._conn = conn - self._check_mode = check_mode + self._module = module self._tools = FMGRCommon def process_request(self, url, datagram, method): @@ -70,11 +74,12 @@ class FortiManagerHandler(object): """ data = self._tools.format_request(method, url, **datagram) response = self._conn.send_request(method, data) - if HAS_FMGR_DEBUG: - try: - debug_dump(response, datagram, url, method) - except BaseException: - pass + + # if HAS_FMGR_DEBUG: + # try: + # debug_dump(response, datagram, self._module.paramgram, url, method) + # except BaseException: + # pass return response