Ignore:
Timestamp:
Mar 19, 2014, 11:31:01 PM (11 years ago)
Author:
dmik
Message:

python: Merge vendor 2.7.6 to trunk.

Location:
python/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/trunk

  • python/trunk/Doc/library/email.errors.rst

    r2 r391  
    1 :mod:`email`: Exception and Defect classes
    2 ------------------------------------------
     1:mod:`email.errors`: Exception and Defect classes
     2-------------------------------------------------
    33
    44.. module:: email.errors
     
    1818.. exception:: MessageParseError()
    1919
    20    This is the base class for exceptions thrown by the :class:`~email.parser.Parser`
     20   This is the base class for exceptions raised by the :class:`~email.parser.Parser`
    2121   class.  It is derived from :exc:`MessageError`.
    2222
     
    2626   Raised under some error conditions when parsing the :rfc:`2822` headers of a
    2727   message, this class is derived from :exc:`MessageParseError`. It can be raised
    28    from the :meth:`Parser.parse` or :meth:`Parser.parsestr` methods.
     28   from the :meth:`Parser.parse <email.parser.Parser.parse>` or
     29   :meth:`Parser.parsestr <email.parser.Parser.parsestr>` methods.
    2930
    3031   Situations where it can be raised include finding an envelope header after the
     
    3839   Raised under some error conditions when parsing the :rfc:`2822` headers of a
    3940   message, this class is derived from :exc:`MessageParseError`. It can be raised
    40    from the :meth:`Parser.parse` or :meth:`Parser.parsestr` methods.
     41   from the :meth:`Parser.parse <email.parser.Parser.parse>` or
     42   :meth:`Parser.parsestr <email.parser.Parser.parsestr>` methods.
    4143
    4244   Situations where it can be raised include not being able to find the starting or
     
    4749.. exception:: MultipartConversionError()
    4850
    49    Raised when a payload is added to a :class:`Message` object using
    50    :meth:`add_payload`, but the payload is already a scalar and the message's
    51    :mailheader:`Content-Type` main type is not either :mimetype:`multipart` or
    52    missing.  :exc:`MultipartConversionError` multiply inherits from
    53    :exc:`MessageError` and the built-in :exc:`TypeError`.
     51   Raised when a payload is added to a :class:`~email.message.Message` object
     52   using :meth:`add_payload`, but the payload is already a scalar and the
     53   message's :mailheader:`Content-Type` main type is not either
     54   :mimetype:`multipart` or missing.  :exc:`MultipartConversionError` multiply
     55   inherits from :exc:`MessageError` and the built-in :exc:`TypeError`.
    5456
    55    Since :meth:`Message.add_payload` is deprecated, this exception is rarely raised
    56    in practice.  However the exception may also be raised if the :meth:`attach`
     57   Since :meth:`Message.add_payload` is deprecated, this exception is rarely
     58   raised in practice.  However the exception may also be raised if the
     59   :meth:`~email.message.Message.attach`
    5760   method is called on an instance of a class derived from
    5861   :class:`~email.mime.nonmultipart.MIMENonMultipart` (e.g.
    5962   :class:`~email.mime.image.MIMEImage`).
    6063
    61 Here's the list of the defects that the :class:`~email.mime.parser.FeedParser`
     64Here's the list of the defects that the :class:`~email.parser.FeedParser`
    6265can find while parsing messages.  Note that the defects are added to the message
    6366where the problem was found, so for example, if a message nested inside a
     
    8790
    8891* :class:`MultipartInvariantViolationDefect` -- A message claimed to be a
    89   :mimetype:`multipart`, but no subparts were found.  Note that when a message has
    90   this defect, its :meth:`is_multipart` method may return false even though its
    91   content type claims to be :mimetype:`multipart`.
     92  :mimetype:`multipart`, but no subparts were found.  Note that when a message
     93  has this defect, its :meth:`~email.message.Message.is_multipart` method may
     94  return false even though its content type claims to be :mimetype:`multipart`.
    9295
Note: See TracChangeset for help on using the changeset viewer.