Merge pull request #49852 from terminalmage/issue49627

Rename logstash engine filename to make it work with the loader
This commit is contained in:
Nicole Thomas 2018-10-02 13:42:09 -04:00 committed by GitHub
commit 1c8def9641
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,16 +30,16 @@ import salt.utils.event
# Import third-party libs
try:
import logstash
HAS_LOGSTASH = True
except ImportError:
HAS_LOGSTASH = False
logstash = None
__virtualname__ = 'logstash'
def __virtual__():
if not HAS_LOGSTASH:
return False
else:
return True
return __virtualname__ \
if logstash is not None \
else (False, 'python-logstash not installed')
log = logging.getLogger(__name__)