Mercurial > public > sg101
diff phantombrigade/views.py @ 648:10f3acc18b2d
Improve TS3 error handling when remote server is kaput (#33).
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 23 Mar 2013 13:38:32 -0500 |
parents | ee87ea74d46b |
children | 89b240fe9297 |
line wrap: on
line diff
--- a/phantombrigade/views.py Sat Mar 23 13:21:14 2013 -0500 +++ b/phantombrigade/views.py Sat Mar 23 13:38:32 2013 -0500 @@ -42,17 +42,17 @@ return HttpResponseServerError() response = svr.send_command('serverinfo') - if response.response['msg'] != 'ok': + if response.response.get('msg') != 'ok': return HttpResponseServerError() svr_info = response.data[0] response = svr.send_command('channellist') - if response.response['msg'] != 'ok': + if response.response.get('msg') != 'ok': return HttpResponseServerError() channel_list = response.data response = svr.send_command('clientlist') - if response.response['msg'] != 'ok': + if response.response.get('msg') != 'ok': return HttpResponseServerError() client_list = response.data