This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
PyBitmessage-2024-12-02/src/configparser.py

16 lines
612 B
Python

from ConfigParser import SafeConfigParser, ConfigParser
class BMConfigParser(SafeConfigParser):
def set(self, section, option, value=None):
if self._optcre is self.OPTCRE or value:
if not isinstance(value, basestring):
raise TypeError("option values must be strings")
return ConfigParser.set(self, section, option, value)
def get(self, section, option, raw=False, vars=None):
return ConfigParser.get(self, section, option, True, vars)
def items(self, section, raw=False, vars=None):
return ConfigParser.items(self, section, True, vars)