Supposedly fix for #354 in support.openlp.org, a traceback when JSON response from remote cannot be decoded.

This commit is contained in:
Mattias Põldaru 2011-12-23 15:15:19 +02:00
parent 5f6962f4c7
commit 2508e71a44
1 changed files with 6 additions and 1 deletions

View File

@ -332,7 +332,12 @@ class HttpConnection(object):
args = []
for param in match.groups():
args.append(param)
response = func(*args)
try:
response = func(*args)
except ValueError as error:
log.exception(u'Error while decoding JSON message '
'from remote browser.')
return False
break
if response:
self.send_response(response)