Skip to content

Commit

Permalink
Revert "allow Optional int for port"
Browse files Browse the repository at this point in the history
The type change was made in #420, and we don't want to rearrange the
handling of `port is None`.

This reverts commit b464459.
  • Loading branch information
David Robertson committed Oct 14, 2021
1 parent 35efbf8 commit 090ae66
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sydent/replication/peer.py
Expand Up @@ -132,17 +132,15 @@ def __init__(
:param lastSentVersion: The ID of the last association sent to the peer.
"""
super().__init__(server_name, pubkeys)

if port is None:
port = 1001

self.sydent = sydent
self.lastSentVersion = lastSentVersion

# look up or build the replication URL
replication_url = self.sydent.config.http.base_replication_urls.get(server_name)

if replication_url is None:
if not port:
port = 1001
replication_url = "https://%s:%i" % (server_name, port)

if replication_url[-1:] != "/":
Expand Down

0 comments on commit 090ae66

Please sign in to comment.