source: TI12-security/trunk/WSSecurity/ndg/wssecurity/common/utils/configfileparsers.py @ 6391

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/WSSecurity/ndg/wssecurity/common/utils/configfileparsers.py@6391
Revision 6391, 850 bytes checked in by pjkersha, 11 years ago (diff)

refactored config file parsing

Line 
1"""Configuration file parsers specialisations
2
3NERC DataGrid Project
4"""
5__author__ = "Philip Kershaw"
6__date__ = "25/01/2010"
7__copyright__ = "(C) 2010 Science and Technology Facilities Council"
8__license__ = "BSD - see LICENSE file in top-level directory"
9__contact__ = "Philip.Kershaw@stfc.ac.uk"
10__revision__ = '$Id: $'
11from ConfigParser import SafeConfigParser
12
13class CaseSensitiveConfigParser(SafeConfigParser):
14    '''
15    Subclass the SafeConfigParser - to preserve the original string case of the
16    cfg section names - NB, the RawConfigParser default is to lowercase these
17    by default
18    ''' 
19    def optionxform(self, optionstr):
20        '''@type optionstr: basestring
21        @param optionstr: config file option name
22        @return: option name with case preserved
23        @rtype: basestring
24        '''
25        return optionstr
Note: See TracBrowser for help on using the repository browser.