Condense ui.connecting() function a bit

Just tiny non-functional code cleanup.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth 2011-09-29 17:46:46 +02:00
parent 3b647d65be
commit 93b05215fb

View File

@ -228,16 +228,14 @@ class UIBase:
s._msg(offlineimap.banner) s._msg(offlineimap.banner)
def connecting(s, hostname, port): def connecting(s, hostname, port):
if s.verbose < 0: """Log 'Establishing connection to'"""
return if s.verbose < 0: return
if hostname == None: displaystr = ''
hostname = '' hostname = hostname if hostname else ''
if port != None: port = "%d" % port if port else ''
port = ":%s" % str(port) if hostname:
displaystr = ' to %s%s.' % (hostname, port) displaystr = ' to %s:%s' % (hostname, port)
if hostname == '' and port == None: s._msg("Establishing connection%s" % displaystr)
displaystr = '.'
s._msg("Establishing connection" + displaystr)
def acct(self, account): def acct(self, account):
"""Output that we start syncing an account (and start counting)""" """Output that we start syncing an account (and start counting)"""