From 32347bfcc99b13454264bce3e4afe469a8f33026 Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 26 Aug 2014 16:01:29 +0100 Subject: [PATCH] fix a few pyflakes errors --- synapse/handlers/room.py | 7 +++---- synapse/storage/__init__.py | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 074363e80d..53ccaa0991 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -222,8 +222,7 @@ class MessageHandler(BaseHandler): if stamp_event: event.content["hsob_ts"] = int(self.clock.time_msec()) - snapshot = yield self.store.snapshot_room(event.room_id, user_id) - + snapshot = yield self.store.snapshot_room(event.room_id, event.user_id) yield self.auth.check(event, snapshot, raises=True) @@ -577,8 +576,8 @@ class RoomMemberHandler(BaseHandler): content=content, ) - snapshot = yield store.snapshot_room( - room_id, joinee, RoomMemberEvent.TYPE, event.target_user_id + snapshot = yield self.store.snapshot_room( + room_id, joinee, RoomMemberEvent.TYPE, joinee ) yield self._do_join(new_event, snapshot, room_host=host, do_auth=True) diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index 30dc8a50cf..63afca9ad7 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -69,7 +69,7 @@ class DataStore(RoomMemberStore, RoomStore, stream_ordering = self.min_token latest = yield self._db_pool.runInteraction( - _persist_event_txn, event, backfilled, stream_ordering + self._persist_event_txn, event, backfilled, stream_ordering ) defer.returnValue(latest) @@ -128,7 +128,7 @@ class DataStore(RoomMemberStore, RoomStore, except: logger.exception( "Failed to persist, probably duplicate: %s", - event_id + event.event_id ) return @@ -146,7 +146,7 @@ class DataStore(RoomMemberStore, RoomStore, self._simple_insert_txn(txn, "state_events", vals) self._simple_insert_txn( - txn + txn, "current_state_events", { "event_id": event.event_id,