Skip to content

Commit 3455821

Browse files
authored
Unmask "packaging module missing" error (#1126)
When the packaging module is missing the error will be masked because we try to use self.module before it has been initialized
1 parent 83f5e20 commit 3455821

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/module_utils/netbox_dcim.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
class NetboxDcimModule(NetboxModule):
6464
def __init__(self, module, endpoint):
6565
if not HAS_PACKAGING:
66-
self.module.fail_json(
66+
module.fail_json(
6767
msg=missing_required_lib("packaging"), exception=PACKAGING_IMPORT_ERROR
6868
)
6969
super().__init__(module, endpoint)

0 commit comments

Comments
 (0)