Skip to content

Commit 4d98c8e

Browse files
authored
Fix AttributeError in ProxmoxAnsible initialization (#155)
The module attribute was referenced before assignment when checking proxmoxer version, causing initialization to fail. Changed to use the module parameter directly before self.module is set. Co-authored-by: Kevin Quick <[email protected]>
1 parent 44cc54d commit 4d98c8e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/module_utils/proxmox.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def __init__(self, module):
8181
if not HAS_PROXMOXER:
8282
module.fail_json(msg=missing_required_lib('proxmoxer'), exception=PROXMOXER_IMP_ERR)
8383
if proxmoxer_version < LooseVersion('2.0'):
84-
self.module.fail_json(f'Requires proxmoxer 2.0 or newer; found version {proxmoxer_version}')
84+
module.fail_json(f'Requires proxmoxer 2.0 or newer; found version {proxmoxer_version}')
8585

8686
self.module = module
8787
self.proxmoxer_version = proxmoxer_version

0 commit comments

Comments
 (0)