From ac21dfff6d78221760c56e3ea357a4170d5a209e Mon Sep 17 00:00:00 2001 From: Mark Haines Date: Tue, 26 Aug 2014 15:20:05 +0100 Subject: Fix pyflakes errors --- synapse/handlers/federation.py | 2 +- synapse/handlers/presence.py | 2 +- synapse/handlers/room.py | 6 +----- 3 files changed, 3 insertions(+), 7 deletions(-) (limited to 'synapse/handlers') diff --git a/synapse/handlers/federation.py b/synapse/handlers/federation.py index 16bac95331..2680678de7 100644 --- a/synapse/handlers/federation.py +++ b/synapse/handlers/federation.py @@ -175,7 +175,7 @@ class FederationHandler(BaseHandler): try: yield self.store.store_room( - event.room_id, + room_id, "", is_public=False ) diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py index 471dc86163..be10162db5 100644 --- a/synapse/handlers/presence.py +++ b/synapse/handlers/presence.py @@ -674,7 +674,7 @@ class PresenceHandler(BaseHandler): def push_update_to_clients(self, observer_user, observed_user, statuscache): - state = statuscache.make_event(user=observed_user, clock=self.clock) + statuscache.make_event(user=observed_user, clock=self.clock) self.notifier.on_new_user_event( observer_user.to_string(), diff --git a/synapse/handlers/room.py b/synapse/handlers/room.py index 5489de841f..c2b10f4189 100644 --- a/synapse/handlers/room.py +++ b/synapse/handlers/room.py @@ -20,8 +20,7 @@ from synapse.types import UserID, RoomAlias, RoomID from synapse.api.constants import Membership from synapse.api.errors import RoomError, StoreError, SynapseError from synapse.api.events.room import ( - RoomTopicEvent, MessageEvent, InviteJoinEvent, RoomMemberEvent, - RoomConfigEvent + RoomTopicEvent, RoomMemberEvent, RoomConfigEvent ) from synapse.api.streams.event import EventStream, EventsStreamData from synapse.handlers.presence import PresenceStreamData @@ -29,7 +28,6 @@ from synapse.util import stringutils from ._base import BaseHandler import logging -import json logger = logging.getLogger(__name__) @@ -303,8 +301,6 @@ class MessageHandler(BaseHandler): except: logger.exception("Failed to get snapshot") - user = self.hs.parse_userid(user_id) - ret = {"rooms": rooms_ret, "presence": presence[0], "end": now_token} # logger.debug("snapshot_all_rooms returning: %s", ret) -- cgit 1.4.1