mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
firewalld: don't reference undefined variable in error case (#31949)
* firewalld: don't reference undefined variable in error case Signed-off-by: Adam Miller <maxamillion@fedoraproject.org> * firewalld: don't set exception as var and not use it Signed-off-by: Adam Miller <maxamillion@fedoraproject.org>
This commit is contained in:
parent
f76afab6e5
commit
5b7d161b10
1 changed files with 2 additions and 3 deletions
|
@ -169,7 +169,7 @@ try:
|
||||||
fw.start()
|
fw.start()
|
||||||
fw_offline = True
|
fw_offline = True
|
||||||
|
|
||||||
except ImportError as e:
|
except ImportError:
|
||||||
import_failure = True
|
import_failure = True
|
||||||
|
|
||||||
|
|
||||||
|
@ -751,8 +751,7 @@ def main():
|
||||||
|
|
||||||
if import_failure:
|
if import_failure:
|
||||||
module.fail_json(
|
module.fail_json(
|
||||||
msg='firewalld and its python 2 module are required for this module, version 2.0.11 or newer required (3.0.9 or newer for offline operations) \n %s'
|
msg='firewalld and its python 2 module are required for this module, version 2.0.11 or newer required (3.0.9 or newer for offline operations)'
|
||||||
% e
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if fw_offline:
|
if fw_offline:
|
||||||
|
|
Loading…
Reference in a new issue