Skip to content

Commit

Permalink
fixed bug: key['success'] error when schedule return
Browse files Browse the repository at this point in the history
based on return to judge if the schedule is success execute
  • Loading branch information
halfss committed Jun 1, 2013
1 parent f137a5b commit 3f5805f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions salt/returners/mysql.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ def returner(ret):
sql = '''INSERT INTO `salt_returns`
(`fun`, `jid`, `return`, `id`, `success`, `full_ret` )
VALUES (%s, %s, %s, %s, %s, %s)'''
if len(ret['return']) == str(ret['return']).count("'result': True"):
ret['success'] = True
cur.execute(sql, (ret['fun'], ret['jid'],
str(ret['return']), ret['id'],
ret['success'], json.dumps(ret)))
Expand Down

0 comments on commit 3f5805f

Please sign in to comment.