Blame SOURCES/fix-issue-28.patch
|
|
a47f27 |
From 68843c1f3dd21a06aa2dc3637a4ffa40f6d572a8 Mon Sep 17 00:00:00 2001
|
|
|
a47f27 |
From: Tim Lauridsen <timlau@fedoraproject.org>
|
|
|
a47f27 |
Date: Sun, 9 Sep 2012 16:10:17 +0200
|
|
|
a47f27 |
Subject: [PATCH] fix for option begining with rem is removed (upstream issue
|
|
|
a47f27 |
#28)
|
|
|
a47f27 |
|
|
|
a47f27 |
--
|
|
|
a47f27 |
diff --git a/iniparse/ini.py b/iniparse/ini.py
|
|
|
a47f27 |
index 408354d..68dd65c 100644
|
|
|
a47f27 |
--- a/iniparse/ini.py
|
|
|
a47f27 |
+++ b/iniparse/ini.py
|
|
|
a47f27 |
@@ -171,7 +171,7 @@ def change_comment_syntax(comment_chars='%;#', allow_rem=False):
|
|
|
a47f27 |
CommentLine.regex = re.compile(regex)
|
|
|
a47f27 |
|
|
|
a47f27 |
class CommentLine(LineType):
|
|
|
a47f27 |
- regex = re.compile(r'^(?P<csep>[;#]|[rR][eE][mM])'
|
|
|
a47f27 |
+ regex = re.compile(r'^(?P<csep>[;#]|[rR][eE][mM] +)'
|
|
|
a47f27 |
r'(?P<comment>.*)$')
|
|
|
a47f27 |
|
|
|
a47f27 |
def __init__(self, comment='', separator='#', line=None):
|
|
|
a47f27 |
--- a/tests/test_ini.py.orig 2013-07-31 13:16:19.944347042 +0200
|
|
|
a47f27 |
+++ b/tests/test_ini.py 2013-07-31 13:16:35.806330262 +0200
|
|
|
a47f27 |
@@ -145,7 +145,6 @@
|
|
|
a47f27 |
';; this is also a comment',
|
|
|
a47f27 |
'; so is this ',
|
|
|
a47f27 |
'Rem and this',
|
|
|
a47f27 |
- 'remthis too!'
|
|
|
a47f27 |
]
|
|
|
a47f27 |
def test_parsing(self):
|
|
|
a47f27 |
for l in self.lines:
|
|
|
a47f27 |
--
|
|
|
a47f27 |
1.7.11.4
|