Fix #1936 : Referenced before assignment error in json_api

This commit is contained in:
Calum Lind 2012-01-09 19:16:15 +00:00
parent 3b1ac4e81f
commit a01f45cc7a
1 changed files with 12 additions and 10 deletions

View File

@ -747,6 +747,8 @@ class WebApi(JSONComponent):
try:
host_id, host, port, user, password = self.get_host(host_id)
except TypeError, e:
host = None
port = None
return response(_("Offline"))
def on_connect(connected, c, host_id):