From 4de2dfc72ba6ea451c9dba8b938a861b4f065a35 Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 24 Apr 2014 21:12:48 +0200 Subject: Fix a bug in the config._parse_file function (traceback when parsing empty files) --- src/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.py b/src/config.py index 34db0477..354c3447 100644 --- a/src/config.py +++ b/src/config.py @@ -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) -- cgit v1.2.3