Handle bad trustedpeer setting

This commit is contained in:
Dmitri Bogomolov 2019-06-07 13:54:47 +03:00
parent f868c1ad11
commit 29f9cd9545
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -31,8 +31,13 @@ def _loadTrustedPeer():
# This probably means the trusted peer wasn't specified so we
# can just leave it as None
host, port = trustedPeer.split(':')
host, port = trustedPeer.split(':')
except ValueError:
'Bad trustedpeer config setting! It should be set as'
' trustedpeer=<hostname>:<portnumber>'
state.trustedPeer = state.Peer(host, int(port))