Fix string formatting when port is not given.
If port is None, we would try to format an empty string with %d wich fails. Fix it by using %s. Reported-by: Iain Dalton <iain.dalton@gmail.com> Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
parent
3885acf87d
commit
0ba9634205
@ -232,7 +232,7 @@ class UIBase:
|
|||||||
if s.verbose < 0: return
|
if s.verbose < 0: return
|
||||||
displaystr = ''
|
displaystr = ''
|
||||||
hostname = hostname if hostname else ''
|
hostname = hostname if hostname else ''
|
||||||
port = "%d" % port if port else ''
|
port = "%s" % port if port else ''
|
||||||
if hostname:
|
if hostname:
|
||||||
displaystr = ' to %s:%s' % (hostname, port)
|
displaystr = ' to %s:%s' % (hostname, port)
|
||||||
s._msg("Establishing connection%s" % displaystr)
|
s._msg("Establishing connection%s" % displaystr)
|
||||||
|
Loading…
Reference in New Issue
Block a user