From baf04be5cfa6337dcc6041cdb67023aa7f950ee1 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Wed, 13 Aug 2014 18:15:23 +0100 Subject: [PATCH] Set datastore's .hs field in SQLBaseStore rather than in the toplevel DataStore mixed-in result class --- synapse/storage/__init__.py | 1 - synapse/storage/_base.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index 3c27428c08..5d5b5f7c44 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -44,7 +44,6 @@ class DataStore(RoomDataStore, RoomMemberStore, MessageStore, RoomStore, def __init__(self, hs): super(DataStore, self).__init__(hs) self.event_factory = hs.get_event_factory() - self.hs = hs def persist_event(self, event): if event.type == MessageEvent.TYPE: diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 65f691ead4..1b98bdfcef 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -27,6 +27,7 @@ logger = logging.getLogger(__name__) class SQLBaseStore(object): def __init__(self, hs): + self.hs = hs self._db_pool = hs.get_db_pool() def cursor_to_dict(self, cursor):