mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #31189 from dmacvicar/dmacvicar-2015.8-31106
Fix crash with scheduler and runners (#31106)
This commit is contained in:
commit
62d76902ce
2 changed files with 10 additions and 1 deletions
|
@ -53,6 +53,12 @@ class ClientFuncsDict(collections.MutableMapping):
|
|||
def __init__(self, client):
|
||||
self.client = client
|
||||
|
||||
def __getattr__(self, attr):
|
||||
'''
|
||||
Provide access eg. to 'pack'
|
||||
'''
|
||||
return getattr(self.client.functions, attr)
|
||||
|
||||
def __setitem__(self, key, val):
|
||||
raise NotImplementedError()
|
||||
|
||||
|
|
|
@ -700,7 +700,10 @@ class Schedule(object):
|
|||
)
|
||||
)
|
||||
|
||||
ret['retcode'] = self.functions.pack['__context__']['retcode']
|
||||
# runners do not provide retcode
|
||||
if 'retcode' in self.functions.pack['__context__']:
|
||||
ret['retcode'] = self.functions.pack['__context__']['retcode']
|
||||
|
||||
ret['success'] = True
|
||||
except Exception:
|
||||
log.exception("Unhandled exception running {0}".format(ret['fun']))
|
||||
|
|
Loading…
Add table
Reference in a new issue