[yum-commits] verifytree.py
skvidal at osuosl.org
skvidal at osuosl.org
Fri Oct 3 18:49:16 UTC 2008
verifytree.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 920784874b2d1ceb86175e5b4dbebea06989da40
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Fri Oct 3 14:47:46 2008 -0400
apply patch from jkeating to make config parser use in verifytree stop
being case insensitive due to file path names in the config verifytree
is reading
diff --git a/verifytree.py b/verifytree.py
index 434d095..0fba2a7 100755
--- a/verifytree.py
+++ b/verifytree.py
@@ -23,6 +23,14 @@ from yum import Errors
from optparse import OptionParser
import ConfigParser
+# Subclass ConfigParser so that the options don't get lowercased. This is
+# important given that they are path names.
+class LocalConfigParser(ConfigParser.ConfigParser):
+ """A subclass of ConfigParser which does not lowercase options"""
+
+ def optionxform(self, optionstr):
+ return optionstr
+
####
# take a file path to a repo as an option, verify all the metadata vs repomd.xml
# optionally go through packages and verify them vs the checksum in the primary
@@ -74,7 +82,7 @@ def treeinfo_checksum(treeinfo):
# read treeinfo file into cp
# take checksums section
result = 0
- cp = ConfigParser.ConfigParser()
+ cp = LocalConfigParser()
try:
cp.read(treeinfo)
except ConfigParser.MissingSectionHeaderError:
More information about the Yum-commits
mailing list