Make the pcre stuff work

This commit is contained in:
Thomas S Hatch 2011-03-11 12:21:09 -07:00
parent e5387b07f8
commit ec6672168d
2 changed files with 7 additions and 3 deletions

View file

@ -56,8 +56,12 @@ class SaltCMD(object):
Execute the salt command line
'''
local = salt.client.LocalClient()
print local.cmd(self.opts['tgt'],
args = [self.opts['tgt'],
self.opts['fun'],
self.opts['arg'],
self.opts['timeout'])
self.opts['timeout'],
]
if self.opts['pcre']:
args.append('pcre')
print local.cmd(*args)

View file

@ -60,7 +60,7 @@ class LocalClient(object):
except:
raise SaltClientError('Failed to read in the salt root key')
def cmd(self, tgt, fun, arg=(), expr_form='glob', timeout=5):
def cmd(self, tgt, fun, arg=(), timeout=5, expr_form='glob'):
'''
Execute a salt command and return.
'''