Don't use hard coded paths, use syspaths.

This commit is contained in:
Pedro Algarvio 2013-12-08 16:02:06 +00:00
parent f947aaf790
commit b809e58505

View File

@ -825,8 +825,10 @@ def deploy_script(host, port=22, timeout=900, username='root',
return False
def fire_event(key, msg, tag, args=None, sock_dir='/var/run/salt/master'):
def fire_event(key, msg, tag, args=None, sock_dir=None):
# Fire deploy action
if sock_dir is None:
sock_dir = os.path.join(syspaths.SOCK_DIR, 'master')
event = salt.utils.event.SaltEvent('master', sock_dir)
try:
event.fire_event(msg, tag)