From d4f50f3ae5a23886eb271ad8cee92d5fb5aae8b0 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Fri, 20 Mar 2015 10:57:08 +0000 Subject: [PATCH] decode_result takes an iterable --- synapse/storage/room.py | 5 ++++- synapse/storage/transactions.py | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/synapse/storage/room.py b/synapse/storage/room.py index 3c23f29215..b5031f5c77 100644 --- a/synapse/storage/room.py +++ b/synapse/storage/room.py @@ -68,7 +68,10 @@ class RoomStore(SQLBaseStore): """ query = RoomsTable.select_statement("room_id=?") return self._execute( - "get_room", RoomsTable.decode_single_result, query, room_id, + "get_room", + lambda txn: RoomsTable.decode_single_result(txn.fetchall()), + query, + room_id, ) @defer.inlineCallbacks diff --git a/synapse/storage/transactions.py b/synapse/storage/transactions.py index b5ed5453d8..92eec69ef4 100644 --- a/synapse/storage/transactions.py +++ b/synapse/storage/transactions.py @@ -122,7 +122,7 @@ class TransactionStore(SQLBaseStore): ) txn.execute(query, (destination,)) - results = SentTransactions.decode_results(txn) + results = SentTransactions.decode_results(txn.fetchall()) prev_txns = [r.transaction_id for r in results]