in general though if we have a corrupted .repo file we error out and
report it.
---
 yum/parser.py |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

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:
-- 
1.7.3.4

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to