[yum-commits] Branch 'yum-3_2_X' - yum/parser.py
skvidal at osuosl.org
skvidal at osuosl.org
Thu Feb 17 17:57:51 UTC 2011
yum/parser.py | 5 +++++
1 file changed, 5 insertions(+)
New commits:
commit 4d9323f933b693efd754d4890497139c59ef4edb
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Thu Feb 17 12:32:48 2011 -0500
steps around
https://bugzilla.redhat.com/show_bug.cgi?id=678301
in general though if we have a corrupted .repo file we error out and
report it.
diff --git a/yum/parser.py b/yum/parser.py
index e46d611..fccf528 100644
--- a/yum/parser.py
+++ b/yum/parser.py
@@ -144,6 +144,11 @@ class ConfigPreProcessor:
# the current file returned EOF, pop it off the stack.
self._popfile()
+ # if the section is prefixed by a space then it is breaks iniparser/configparser
+ # so fix it
+ broken_sec_match = re.match(r'\s+\[(?P<section>.*)\]', line)
+ if broken_sec_match:
+ line = line.lstrip()
# at this point we have a line from the topmost file on the stack
# or EOF if the stack is empty
if self._vars:
More information about the Yum-commits
mailing list