From 975c06bb5d0b2edf44ceb237b65ed4dd45ca76c9 Mon Sep 17 00:00:00 2001 From: Keith Mitchell Date: Tue, 13 Mar 2012 13:41:30 -0700 Subject: [PATCH] ConfigParser should be case sensitive --- r2/updateini.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/r2/updateini.py b/r2/updateini.py index ee73ef171..cda38f11e 100755 --- a/r2/updateini.py +++ b/r2/updateini.py @@ -6,6 +6,10 @@ import sys def main(source_ini, update_ini): parser = Parser() + # By default, the parser is case insensitve and rewrites config + # keys to lowercase. reddit is case sensitive, however + # See: http://docs.python.org/library/configparser.html#ConfigParser.RawConfigParser.optionxform + parser.optionxform = str # parser.read() will "fail" silently if the file is # not found; use open() and parser.readfp() to fail # on missing (or unreadable, etc.) file