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_offline = True
|
||||
|
||||
except ImportError as e:
|
||||
except ImportError:
|
||||
import_failure = True
|
||||
|
||||
|
||||
|
@ -751,8 +751,7 @@ def main():
|
|||
|
||||
if import_failure:
|
||||
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'
|
||||
% e
|
||||
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)'
|
||||
)
|
||||
|
||||
if fw_offline:
|
||||
|
|
Loading…
Reference in a new issue