mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix ponysay outputter hardcoded path
Ponies embody the spirit of freedom and that should include the freedom to put `ponysay` anywhere on the `PATH` that I want.
This commit is contained in:
parent
3bac06f099
commit
5a271acfdc
1 changed files with 7 additions and 2 deletions
|
@ -41,15 +41,20 @@ Example output:
|
|||
|
||||
# Import Python libs
|
||||
from __future__ import absolute_import
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
# Import Salt libs
|
||||
import salt.utils
|
||||
import salt.utils.locales
|
||||
|
||||
|
||||
__virtualname__ = 'pony'
|
||||
|
||||
|
||||
def __virtual__():
|
||||
return os.path.isfile('/usr/bin/ponysay')
|
||||
if salt.utils.which('ponysay'):
|
||||
return __virtualname__
|
||||
return False
|
||||
|
||||
|
||||
def output(data, **kwargs): # pylint: disable=unused-argument
|
||||
|
|
Loading…
Add table
Reference in a new issue