Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Properties
configparser.DuplicateSectionError Class Reference
Inheritance diagram for configparser.DuplicateSectionError:
Inheritance graph
Collaboration diagram for configparser.DuplicateSectionError:
Collaboration graph

List of all members.

Public Member Functions

def __init__
def __repr__

Public Attributes



 message = property(_get_message, _set_message)

Detailed Description

Raised when a section is repeated in an input source.

Possible repetitions that raise this exception are: multiple creation
using the API or in strict parsers when a section is found more than once
in a single input file, string or dictionary.

Definition at line 183 of file

Constructor & Destructor Documentation

def configparser.DuplicateSectionError.__init__ (   self,
  source = None,
  lineno = None 

Definition at line 191 of file

00192     def __init__(self, section, source=None, lineno=None):
00193         msg = [repr(section), " already exists"]
00194         if source is not None:
00195             message = ["While reading from ", source]
00196             if lineno is not None:
00197                 message.append(" [line {0:2d}]".format(lineno))
00198             message.append(": section ")
00199             message.extend(msg)
00200             msg = message
00201         else:
00202             msg.insert(0, "Section ")
00203         Error.__init__(self, "".join(msg))
00204         self.section = section
00205         self.source = source
00206         self.lineno = lineno
00207         self.args = (section, source, lineno)

Here is the caller graph for this function:

Member Function Documentation

def configparser.Error.__repr__ (   self) [inherited]

Definition at line 168 of file

00169     def __repr__(self):
00170         return self.message

Member Data Documentation

Definition at line 206 of file

Definition at line 205 of file

Definition at line 203 of file

Definition at line 204 of file

Property Documentation

configparser.Error.message = property(_get_message, _set_message) [static, inherited]

Definition at line 162 of file

The documentation for this class was generated from the following file: