aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugeni Dodonov <eugeni@mandriva.org>2009-08-21 14:22:23 +0000
committerEugeni Dodonov <eugeni@mandriva.org>2009-08-21 14:22:23 +0000
commite482b6984c453aa96203034badeca8fc4d557595 (patch)
tree52d7aae8b2f6dc11ef4e79f55d32ccecdb674ac1
parent5b8b0b59a1d5c6c7e08bb0d5c8928ef75e5f039f (diff)
downloadmsec-e482b6984c453aa96203034badeca8fc4d557595.tar
msec-e482b6984c453aa96203034badeca8fc4d557595.tar.gz
msec-e482b6984c453aa96203034badeca8fc4d557595.tar.bz2
msec-e482b6984c453aa96203034badeca8fc4d557595.tar.xz
msec-e482b6984c453aa96203034badeca8fc4d557595.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 74e4d08..9ea5526 100644
--- a/src/msec/config.py
+++ b/src/msec/config.py
@@ -231,6 +231,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)
@@ -322,6 +324,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)