From 01c0f070ff160b8853d55b943be2e62558be91fc Mon Sep 17 00:00:00 2001 From: jpfeiffer16 Date: Fri, 21 Jun 2019 21:44:14 -0600 Subject: [PATCH] Tolerate buggy servers not supplying mandatory 'expensive' tag Do not fail variable lookup if an element does not have the 'expensive' key --- python3/vimspector/variables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python3/vimspector/variables.py b/python3/vimspector/variables.py index 7e2c9c9..ac19e6b 100644 --- a/python3/vimspector/variables.py +++ b/python3/vimspector/variables.py @@ -113,7 +113,7 @@ class VariablesView( object ): old_scopes[ i ][ 'name' ] == scope[ 'name' ] ): scope[ '_expanded' ] = old_scopes[ i ].get( '_expanded', False ) scope[ '_old_variables' ] = old_scopes[ i ].get( '_variables', [] ) - elif not scope[ 'expensive' ]: + elif not scope.get( 'expensive' ): # Expand any non-expensive scope unless manually collapsed scope[ '_expanded' ] = True