Add ip:port shorthand to Controller

Fixes #475
This commit is contained in:
Bob Lantz
2015-02-04 11:16:42 -08:00
parent f77a8b9e17
commit 17ba6a7c4d
+4
View File
@@ -1385,6 +1385,10 @@ class Controller( Node ):
self.command = command
self.cargs = cargs
self.cdir = cdir
# Accept 'ip:port' syntax as shorthand
if ':' in ip:
ip, port = ip.split( ':' )
port = int( port )
self.ip = ip
self.port = port
self.protocol = protocol