fix for upstream issue 28

This commit is contained in:
Tim Lauridsen 2012-09-10 06:35:09 +02:00
parent 0d84ad582b
commit e4224706d8
2 changed files with 32 additions and 1 deletions

26
fix-issue-28.patch Normal file
View File

@ -0,0 +1,26 @@
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

View File

@ -2,12 +2,13 @@
Name: python-iniparse
Version: 0.4
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Python Module for Accessing and Modifying Configuration Data in INI files
Group: Development/Libraries
License: MIT
URL: http://code.google.com/p/iniparse/
Source0: http://iniparse.googlecode.com/files/iniparse-%{version}.tar.gz
Patch0: fix-issue-28.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -28,6 +29,7 @@ use.
%prep
%setup -q -n iniparse-%{version}
%patch0 -p1
%build
%{__python} setup.py build
@ -52,6 +54,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-6
- fix for upstream issue 28
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild