mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Fix condition, avoid deprecation warning.
Find returns -1 if string not found which results in True.
This commit is contained in:
parent
56326a195e
commit
c73f6025b2
@ -22,7 +22,7 @@ def __virtual__():
|
||||
Only load the module if iptables is installed
|
||||
'''
|
||||
global HAS_CHECK
|
||||
if salt_cmd.run('iptables --help', quiet=True).find('--check'):
|
||||
if '--check' in salt_cmd.run('iptables --help', output_loglevel='quiet'):
|
||||
HAS_CHECK = True
|
||||
|
||||
if salt.utils.which('iptables'):
|
||||
|
Loading…
Reference in New Issue
Block a user