Merge pull request #27684 from rallytime/bp-27656

Back-port #27656 to 2015.5
This commit is contained in:
Colton Myers 2015-10-05 15:17:55 -06:00
commit f9ddd4647f

View file

@ -56,6 +56,8 @@ and then:
--
-- Table structure for table 'salt_returns'
--
-- note that 'success' must not have NOT NULL constraint, since
-- some functions don't provide it.
DROP TABLE IF EXISTS salt_returns;
CREATE TABLE salt_returns (
@ -200,12 +202,6 @@ def returner(load):
'''
Return data to a postgres server
'''
# salt guarantees that there will be 'fun', 'jid', 'return' and 'id' but not
# 'success'
success = 'Unknown'
if 'success' in load:
success = load['success']
conn = _get_conn()
if conn is None:
return None
@ -219,7 +215,7 @@ def returner(load):
load['jid'],
json.dumps(unicode(str(load['return']), 'utf-8', 'replace')),
load['id'],
success
load.get('success'),
)
)
_close_conn(conn)