summary refs log tree commit diff
path: root/scripts/federation_client.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-13 10:09:55 +0000
committerErik Johnston <erik@matrix.org>2015-02-13 10:09:55 +0000
commit74626a8de42e7fc8cf18e58872f77792247df6af (patch)
tree84c3224615f2683a9673509f7c03e4b75d91ff32 /scripts/federation_client.py
parentReindent code to be less human-readable to keep pep8 from complaining (diff)
parentReindent code to be less human-readable to keep pep8 from complaining (diff)
downloadsynapse-74626a8de42e7fc8cf18e58872f77792247df6af.tar.xz
Merge branch 'master' of github.com:matrix-org/synapse into develop
Diffstat (limited to 'scripts/federation_client.py')
-rw-r--r--scripts/federation_client.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/federation_client.py b/scripts/federation_client.py
index 3139c61761..ea62dceb36 100644
--- a/scripts/federation_client.py
+++ b/scripts/federation_client.py
@@ -97,8 +97,11 @@ def lookup(destination, path):
     if ":" in destination:
         return "https://%s%s" % (destination, path)
     else:
-        srv = srvlookup.lookup("matrix", "tcp", destination)[0]
-        return "https://%s:%d%s" % (srv.host, srv.port, path)
+        try:
+            srv = srvlookup.lookup("matrix", "tcp", destination)[0]
+            return "https://%s:%d%s" % (srv.host, srv.port, path)
+        except:
+            return "https://%s:%d%s" % (destination, 8448, path)
 
 def get_json(origin_name, origin_key, destination, path):
     request_json = {