summary refs log tree commit diff
diff options
context:
space:
mode:
authorJorik Schellekens <joriks@matrix.org>2019-08-23 16:59:24 +0100
committerJorik Schellekens <joriks@matrix.org>2019-08-28 15:59:54 +0100
commit0690f7fc55f6d52a0d04ff3312bc3f3704ddc8dd (patch)
treecde37bc68e02cdc4ba6b8f87865da808b74d141e
parentMake the model stateless. (diff)
downloadsynapse-0690f7fc55f6d52a0d04ff3312bc3f3704ddc8dd.tar.xz
When I'm alone I count myslef.
-rw-r--r--synapse_topology/model/__init__.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/synapse_topology/model/__init__.py b/synapse_topology/model/__init__.py
index eb91917935..327242feec 100644
--- a/synapse_topology/model/__init__.py
+++ b/synapse_topology/model/__init__.py
@@ -5,13 +5,7 @@ from os.path import abspath, join, exists, isdir
 
 from synapse.config.homeserver import HomeServerConfig
 
-from .constants import (
-    BASE_CONFIG,
-    CONFIG_LOCK,
-    CONFIG_LOCK_DATA,
-    DATA_SUBDIR,
-    SERVER_NAME,
-)
+from .constants import CONFIG_LOCK, CONFIG_LOCK_DATA, DATA_SUBDIR, SERVER_NAME
 from .errors import BaseConfigInUseError, ConfigNotFoundError, ServernameNotSetError
 from .config import create_config
 from .util import is_subpath
@@ -44,7 +38,7 @@ class Model:
         """
         conf_path = abspath(join(self.config_dir, config_path))
 
-        if not is_subpath(config_dir, conf_path):
+        if not is_subpath(self.config_dir, conf_path):
             raise FileNotFoundError()
 
         with open(conf_path, "r") as f: