python-iniparse/fix-issue-28.patch

27 lines
834 B
Diff
Raw Normal View History

2012-09-10 04:35:09 +00:00
From 68843c1f3dd21a06aa2dc3637a4ffa40f6d572a8 Mon Sep 17 00:00:00 2001
From: Tim Lauridsen <timlau@fedoraproject.org>
Date: Sun, 9 Sep 2012 16:10:17 +0200
Subject: [PATCH] fix for option begining with rem is removed (upstream issue
#28)
---
iniparse/ini.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/iniparse/ini.py b/iniparse/ini.py
index 408354d..68dd65c 100644
--- a/iniparse/ini.py
+++ b/iniparse/ini.py
@@ -171,7 +171,7 @@ def change_comment_syntax(comment_chars='%;#', allow_rem=False):
CommentLine.regex = re.compile(regex)
class CommentLine(LineType):
- regex = re.compile(r'^(?P<csep>[;#]|[rR][eE][mM])'
+ regex = re.compile(r'^(?P<csep>[;#]|[rR][eE][mM] +)'
r'(?P<comment>.*)$')
def __init__(self, comment='', separator='#', line=None):
--
1.7.11.4