More workarounds for free-and-loose-with-the-spec servers

This commit is contained in:
Ben Jackson 2018-06-01 19:55:51 +01:00
commit fcf19a6d52
2 changed files with 5 additions and 1 deletions

View file

@ -62,6 +62,10 @@ class StackTraceView( object ):
def consume_threads( message ):
self._threads.clear()
if not message[ 'body' ][ 'threads' ]:
# This is a protocol error. It is required to return at least one!
raise ValueError( 'Server returned no threads. Is it running?' )
for thread in message[ 'body' ][ 'threads' ]:
self._threads.append( thread )