From 20eecdc7be9892d5429dec49b4c0ec6452116582 Mon Sep 17 00:00:00 2001 From: Pi3r Date: Tue, 25 Aug 2015 15:13:40 +0200 Subject: [PATCH] Fix get_load The function `fetchone` always return a tuple (or None): http://initd.org/psycopg/docs/cursor.html?highlight=fetchone#cursor.fetchone --- salt/returners/postgres.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/returners/postgres.py b/salt/returners/postgres.py index 9fb315e80e..0e02944f96 100644 --- a/salt/returners/postgres.py +++ b/salt/returners/postgres.py @@ -204,7 +204,7 @@ def get_load(jid): cur.execute(sql, (jid,)) data = cur.fetchone() if data: - return json.loads(data) + return json.loads(data[0]) _close_conn(conn) return {}