(trivial) config.get_netaddress: use NetAddress.from_string
This commit is contained in:
@@ -608,8 +608,7 @@ class SimpleConfig(Logger):
|
|||||||
text = self.get(key)
|
text = self.get(key)
|
||||||
if text:
|
if text:
|
||||||
try:
|
try:
|
||||||
host, port = text.split(':')
|
return NetAddress.from_string(text)
|
||||||
return NetAddress(host, port)
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user