summaryrefslogtreecommitdiffstats
path: root/Lib/ConfigParser.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-01-14 23:36:06 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-01-14 23:36:06 (GMT)
commit88869f9787cd4ceb2298e4b13980beb057687824 (patch)
tree653976731f926b5e098bf57b4858a9516af220b5 /Lib/ConfigParser.py
parent752d3f557e95cda98a8b50808cfe2f2d0b8767eb (diff)
downloadcpython-88869f9787cd4ceb2298e4b13980beb057687824.zip
cpython-88869f9787cd4ceb2298e4b13980beb057687824.tar.gz
cpython-88869f9787cd4ceb2298e4b13980beb057687824.tar.bz2
Whitespace normalization.
Diffstat (limited to 'Lib/ConfigParser.py')
-rw-r--r--Lib/ConfigParser.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py
index 2f60742..f1e77e8 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))