diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-02-24 14:23:50 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-12 16:24:50 +0000 |
commit | 211c14c3910ca0cd86a55ac27ef575127e73e721 (patch) | |
tree | eedeb1fbd0f4d212c2a1644130a3b8a8a68c051a | |
parent | Expose 'config' as a real HomeServer dependency key (diff) | |
download | synapse-211c14c3910ca0cd86a55ac27ef575127e73e721.tar.xz |
No need to explicitly pass 'web_client' in to create_resource_tree as it can be found via config
-rwxr-xr-x | synapse/app/homeserver.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 3649406efb..5df4ba23ab 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -110,7 +110,7 @@ class SynapseHomeServer(HomeServer): # so that :memory: sqlite works ) - def create_resource_tree(self, web_client, redirect_root_to_web_client): + def create_resource_tree(self, redirect_root_to_web_client): """Create the resource tree for this Home Server. This in unduly complicated because Twisted does not support putting @@ -122,6 +122,8 @@ class SynapseHomeServer(HomeServer): location of the web client. This does nothing if web_client is not True. """ + web_client = self.get_config().webclient + # list containing (path_str, Resource) e.g: # [ ("/aaa/bbb/cc", Resource1), ("/aaa/dummy", Resource2) ] desired_tree = [ @@ -340,7 +342,6 @@ def setup(config_options): ) hs.create_resource_tree( - web_client=config.webclient, redirect_root_to_web_client=True, ) |