# HG changeset patch # User Brian Neal # Date 1364063912 18000 # Node ID 10f3acc18b2d1446f18c9a077b28c779759b7874 # Parent 2a4e2e86c65eabd85163818f2b7276809d0e86ae Improve TS3 error handling when remote server is kaput (#33). diff -r 2a4e2e86c65e -r 10f3acc18b2d phantombrigade/views.py --- 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