diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-01-14 23:36:06 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-01-14 23:36:06 +0000 |
commit | 93fd3db8be692fc82200493b56fc8b223f3bb07e (patch) | |
tree | 93ac28110c30853822ba273571ccd3874d149904 /Lib/ConfigParser.py | |
parent | e10d75565e88b96e3e46387b605bea95179b791c (diff) | |
download | cpython-93fd3db8be692fc82200493b56fc8b223f3bb07e.tar.gz |
Whitespace normalization.
Diffstat (limited to 'Lib/ConfigParser.py')
-rw-r--r-- | Lib/ConfigParser.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py index 2f60742ddb..f1e77e8d7d 100644 --- a/Lib/ConfigParser.py +++ b/Lib/ConfigParser.py @@ -73,16 +73,16 @@ ConfigParser -- responsible for for parsing a list of 1, only) remove_section(section) - remove the given file section and all its options + remove the given file section and all its options remove_option(section, option) - remove the given option from the given section + remove the given option from the given section set(section, option, value) set the given option write(fp) - write the configuration state in .ini format + write the configuration state in .ini format """ import sys @@ -94,7 +94,7 @@ DEFAULTSECT = "DEFAULT" MAX_INTERPOLATION_DEPTH = 10 - + # exception classes class Error(Exception): def __init__(self, msg=''): @@ -166,7 +166,7 @@ class MissingSectionHeaderError(ParsingError): self.line = line - + class ConfigParser: def __init__(self, defaults=None): self.__sections = {} @@ -217,7 +217,7 @@ class ConfigParser: def read(self, filenames): """Read and parse a filename or a list of filenames. - + Files that cannot be opened are silently ignored; this is designed so that you can specify a list of potential configuration file locations (e.g. current directory, user's @@ -285,7 +285,7 @@ class ConfigParser: # do the string interpolation value = rawval # Make it a pretty variable name - depth = 0 + depth = 0 while depth < 10: # Loop through this until it's done depth = depth + 1 if string.find(value, "%(") >= 0: @@ -298,7 +298,7 @@ class ConfigParser: if value.find("%(") >= 0: raise InterpolationDepthError(option, section, rawval) return value - + def __get(self, section, conv, option): return conv(self.get(section, option)) |