Commit 2982d090 authored by Fred Drake's avatar Fred Drake

Update the API slightly: when a named section has been requested and is not

available, raise a more reasonable exception.
parent c2075900
...@@ -472,7 +472,8 @@ The following methods are used in retrieving and managing sections: ...@@ -472,7 +472,8 @@ The following methods are used in retrieving and managing sections:
Returns a single typed section. The type of the retrieved section Returns a single typed section. The type of the retrieved section
is given by \var{type}. If \var{name} is given and not \code{None}, is given by \var{type}. If \var{name} is given and not \code{None},
the name of the section must match \var{name}. If there is no the name of the section must match \var{name}. If there is no
section matching in both name and type, \exception{KeyError} is section matching in both name and type,
\exception{ConfigurationMissingSectionError} is
raised. If \var{name} is not given or is \code{None}, there must be raised. If \var{name} is not given or is \code{None}, there must be
exactly one child section of type \var{type}; that section is exactly one child section of type \var{type}; that section is
returned. If there is more than one section of type \var{type}, returned. If there is more than one section of type \var{type},
...@@ -535,9 +536,12 @@ support this interface. ...@@ -535,9 +536,12 @@ support this interface.
\end{excdesc} \end{excdesc}
\begin{excdesc}{ConfigurationMissingSectionError} \begin{excdesc}{ConfigurationMissingSectionError}
Raised when a requested named section is not available.
\end{excdesc} \end{excdesc}
\begin{excdesc}{ConfigurationConflictingSectionError} \begin{excdesc}{ConfigurationConflictingSectionError}
Raised when a request for a section cannot be fulfilled without
ambiguity.
\end{excdesc} \end{excdesc}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment