Commit 4de2dfc7 authored by mathieui's avatar mathieui

Fix a bug in the config._parse_file function (traceback when parsing empty files)

parent 1349f297
......@@ -256,7 +256,7 @@ class Config(RawConfigParser):
sections[current_section] = [current_line, current_line]
current_line += 1
if not duplicate_section:
if not duplicate_section and current_section:
sections[current_section][1] = current_line
return (sections, lines_before)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment