Fix condition, avoid deprecation warning.

Find returns -1 if string not found which results in True.
This commit is contained in:
Andrew Burdo 2014-05-31 00:57:17 +03:00
parent 56326a195e
commit c73f6025b2

View File

@ -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'):