aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-08-21 14:24:15 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-08-21 14:24:15 +0000
commitb7f94c03b9aa86aa960f82c7fd5a8762d4e93f17 (patch)
treea1cb5ce4db848b858bf0bb5beaad88bc8f454730
parentefcc82dbe0c64e7e2717a1650af33d782358a5c6 (diff)
downloadmsec-b7f94c03b9aa86aa960f82c7fd5a8762d4e93f17.tar
msec-b7f94c03b9aa86aa960f82c7fd5a8762d4e93f17.tar.gz
msec-b7f94c03b9aa86aa960f82c7fd5a8762d4e93f17.tar.bz2
msec-b7f94c03b9aa86aa960f82c7fd5a8762d4e93f17.tar.xz
msec-b7f94c03b9aa86aa960f82c7fd5a8762d4e93f17.zip
Do not crash on empty lines.
-rw-r--r--src/msec/config.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/msec/config.py b/src/msec/config.py
index 3facc25..3cd635d 100644
--- a/src/msec/config.py
+++ b/src/msec/config.py
@@ -238,6 +238,8 @@ class MsecConfig:
return False
for line in fd.readlines():
line = line.strip()
+ if not line:
+ continue
if line[0] == "#":
# comment
self.comments.append(line)
@@ -329,6 +331,8 @@ class PermConfig(MsecConfig):
return False
for line in fd.readlines():
line = line.strip()
+ if not line:
+ continue
if line[0] == "#":
# comment
self.comments.append(line)