Address review comment

This commit is contained in:
Pradyun S. Gedam 2017-06-13 21:42:32 +05:30
parent daf754ae25
commit b5bfca1004
1 changed files with 4 additions and 4 deletions

View File

@ -153,10 +153,10 @@ class Configuration(object):
section, name = _disassemble_key(key)
# Remove the key in the parser
modified_something = (
parser.has_section(section) and
parser.remove_option(section, name)
)
modified_something = False
if parser.has_section(section):
# Returns whether the option was removed or not
modified_something = parser.remove_option(section, name)
if modified_something:
# name removed from parser, section may now be empty