diff options
author | Erik Johnston <erik@matrix.org> | 2016-01-19 16:11:39 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2016-01-19 16:11:39 +0000 |
commit | 2818a000aa5ca7968f196898908f31a732387791 (patch) | |
tree | 3d873a4aeb71913540fffc1bdebdf40a9ca47c4a | |
parent | Change regex cache size to 5000 (diff) | |
download | synapse-2818a000aa5ca7968f196898908f31a732387791.tar.xz |
Use split rather than endswith
-rw-r--r-- | synapse/server.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/synapse/server.py b/synapse/server.py index 63f9059837..4a5796b982 100644 --- a/synapse/server.py +++ b/synapse/server.py @@ -96,7 +96,6 @@ class BaseHomeServer(object): hostname : The hostname for the server. """ self.hostname = hostname - self.hostname_with_colon = ":" + hostname self._building = {} # Other kwargs are explicit dependencies @@ -141,7 +140,7 @@ class BaseHomeServer(object): return domain_specific_string.domain == self.hostname def is_mine_id(self, string): - return string.endswith(self.hostname_with_colon) + return string.split(":", 1)[1] == self.hostname # Build magic accessors for every dependency for depname in BaseHomeServer.DEPENDENCIES: |