Back to index

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

List of all members.

Public Member Functions

def __init__
def __repr__

Public Attributes



 message = property(_get_message, _set_message)

Detailed Description

Raised by strict parsers when an option is repeated in an input source.

Current implementation raises this exception only when an option is found
more than once in a single file, string or dictionary.

Definition at line 209 of file

Constructor & Destructor Documentation

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

Definition at line 216 of file

00217     def __init__(self, section, option, source=None, lineno=None):
00218         msg = [repr(option), " in section ", repr(section),
00219                " already exists"]
00220         if source is not None:
00221             message = ["While reading from ", source]
00222             if lineno is not None:
00223                 message.append(" [line {0:2d}]".format(lineno))
00224             message.append(": option ")
00225             message.extend(msg)
00226             msg = message
00227         else:
00228             msg.insert(0, "Option ")
00229         Error.__init__(self, "".join(msg))
00230         self.section = section
00231         self.option = option
00232         self.source = source
00233         self.lineno = lineno
00234         self.args = (section, option, 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 233 of file

Definition at line 232 of file

Definition at line 230 of file

Definition at line 229 of file

Definition at line 231 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: