Handling no diagnostic data from event response

This commit is contained in:
Strahinja Val Markovic 2013-10-04 10:18:31 -07:00
parent a471ce761f
commit afa1afc49b

View File

@ -51,14 +51,18 @@ class EventNotification( BaseRequest ):
return []
try:
self._cached_response = [ _ConvertDiagnosticDataToVimData( x )
for x in JsonFromFuture(
self._response_future ) ]
return self._cached_response
self._cached_response = JsonFromFuture( self._response_future )
except Exception as e:
vimsupport.PostVimMessage( str( e ) )
return []
if not self._cached_response:
return []
self._cached_response = [ _ConvertDiagnosticDataToVimData( x )
for x in self._cached_response ]
return self._cached_response
def _ConvertDiagnosticDataToVimData( diagnostic ):
# see :h getqflist for a description of the dictionary fields