Skip to content

Commit b8e816b

Browse files
authored
Merge pull request #20 from mwcraig/fix-spyder-config-item
Get spyder config item in way that works when item does not exist
2 parents 9075803 + 9ebb64e commit b8e816b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vpython/_notebook_helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ def __is_spyder():
88

99
def _spyder_run_setting_is_correct():
1010
from spyder.config.main import CONF
11-
return CONF['run']['default/interpreter/dedicated']
11+
# Use this instead of accessing like a dictionary so that a
12+
# default value can be supplied if the setting is missing.
13+
return CONF.get('run', 'default/interpreter/dedicated', False)
1214

1315

1416
def _warn_if_spyder_settings_wrong():

0 commit comments

Comments
 (0)