[3.6] bpo-30779: IDLE: fix changes.delete_section calls in configdialog (GH-2667) (#2674)

Also improve test of config.ConfigChanges.delete_section.
Original patch by Cheryl Sabella.
(cherry picked from commit 6d13b22)
This commit is contained in:
terryjreedy 2017-07-11 19:50:10 -04:00 committed by GitHub
parent 675c1adfe5
commit c0179483f1
3 changed files with 9 additions and 5 deletions

View file

@ -839,7 +839,7 @@ class ConfigDialog(Toplevel):
return
self.deactivate_current_config()
# Remove key set from changes, config, and file.
changes.remove(keyset_name)
changes.delete_section('keys', keyset_name)
# Reload user key set list.
item_list = idleConf.GetSectionList('user', 'keys')
item_list.sort()
@ -873,7 +873,7 @@ class ConfigDialog(Toplevel):
return
self.deactivate_current_config()
# Remove theme from changes, config, and file.
changes.delete_section('highlight')
changes.delete_section('highlight', theme_name)
# Reload user theme list.
item_list = idleConf.GetSectionList('user', 'highlight')
item_list.sort()