Mercurial > public > sg101
changeset 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 | 2a4e2e86c65e |
children | 1445d318696a |
files | phantombrigade/views.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
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