Disconnect from daemon if getting the info fails

This commit is contained in:
Andrew Resch 2009-12-13 21:34:26 +00:00
parent 43a5a9111b
commit 43df21517e
1 changed files with 3 additions and 2 deletions

View File

@ -271,16 +271,17 @@ class ConnectionManager(component.Component):
self.__update_buttons()
c.disconnect()
def on_info_fail(reason):
def on_info_fail(reason, c):
if not self.running:
return
if row:
row[HOSTLIST_COL_STATUS] = _("Offline")
self.__update_buttons()
c.disconnect()
d = c.daemon.info()
d.addCallback(on_info, c)
d.addErrback(on_info_fail)
d.addErrback(on_info_fail, c)
def on_connect_failed(reason, host_info):
if not self.running: