Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Properties
configparser.MissingSectionHeaderError Class Reference
Inheritance diagram for configparser.MissingSectionHeaderError:
Inheritance graph
[legend]
Collaboration diagram for configparser.MissingSectionHeaderError:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def filename
def filename
def append
def __repr__

Public Attributes

 source
 lineno
 line
 args
 errors

Properties

 message = property(_get_message, _set_message)

Detailed Description

Raised when a key-value pair is found before any section header.

Definition at line 336 of file configparser.py.


Constructor & Destructor Documentation

def configparser.MissingSectionHeaderError.__init__ (   self,
  filename,
  lineno,
  line 
)

Definition at line 339 of file configparser.py.

00339 
00340     def __init__(self, filename, lineno, line):
00341         Error.__init__(
00342             self,
00343             'File contains no section headers.\nfile: %s, line: %d\n%r' %
00344             (filename, lineno, line))
00345         self.source = filename
00346         self.lineno = lineno
00347         self.line = line
00348         self.args = (filename, lineno, line)
00349 
00350 
00351 # Used in parser getters to indicate the default behaviour when a specific
00352 # option is not found it to raise an exception. Created to enable `None' as
# a valid fallback value.

Here is the caller graph for this function:


Member Function Documentation

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

Definition at line 168 of file configparser.py.

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

def configparser.ParsingError.append (   self,
  lineno,
  line 
) [inherited]

Definition at line 331 of file configparser.py.

00331 
00332     def append(self, lineno, line):
00333         self.errors.append((lineno, line))
00334         self.message += '\n\t[line %2d]: %s' % (lineno, line)
00335 

Here is the caller graph for this function:

def configparser.ParsingError.filename (   self) [inherited]
Deprecated, use `source'.

Definition at line 312 of file configparser.py.

00312 
00313     def filename(self):
00314         """Deprecated, use `source'."""
00315         warnings.warn(
00316             "The 'filename' attribute will be removed in future versions.  "
00317             "Use 'source' instead.",
00318             DeprecationWarning, stacklevel=2
00319         )
00320         return self.source

Here is the call graph for this function:

Here is the caller graph for this function:

def configparser.ParsingError.filename (   self,
  value 
) [inherited]
Deprecated, user `source'.

Definition at line 322 of file configparser.py.

00322 
00323     def filename(self, value):
00324         """Deprecated, user `source'."""
00325         warnings.warn(
00326             "The 'filename' attribute will be removed in future versions.  "
00327             "Use 'source' instead.",
00328             DeprecationWarning, stacklevel=2
00329         )
00330         self.source = value

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Reimplemented from configparser.ParsingError.

Definition at line 347 of file configparser.py.

Definition at line 308 of file configparser.py.

Definition at line 346 of file configparser.py.

Definition at line 345 of file configparser.py.

Reimplemented from configparser.ParsingError.

Definition at line 344 of file configparser.py.


Property Documentation

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

Definition at line 162 of file configparser.py.


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