Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
333e830b
Commit
333e830b
authored
May 09, 2004
by
Barry Warsaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add MessageDefect and subclasses.
parent
41f6ad61
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
Lib/email/Errors.py
Lib/email/Errors.py
+27
-4
No files found.
Lib/email/Errors.py
View file @
333e830b
# Copyright (C) 2001
,2002
Python Software Foundation
# Author: barry@
zope.com
(Barry Warsaw)
# Copyright (C) 2001
-2004
Python Software Foundation
# Author: barry@
python.org
(Barry Warsaw)
"""email package exception classes.
"""
"""email package exception classes."""
...
...
@@ -24,3 +23,27 @@ class BoundaryError(MessageParseError):
class
MultipartConversionError
(
MessageError
,
TypeError
):
"""Conversion to a multipart is prohibited."""
# These are parsing defects which the parser was able to work around.
class
MessageDefect
:
"""Base class for a message defect."""
def
__init__
(
self
,
line
=
None
):
self
.
line
=
line
class
NoBoundaryInMultipart
(
MessageDefect
):
"""A message claimed to be a multipart but had no boundary parameter."""
class
StartBoundaryNotFound
(
MessageDefect
):
"""The claimed start boundary was never found."""
class
FirstHeaderLineIsContinuation
(
MessageDefect
):
"""A message had a continuation line as its first header line."""
class
MisplacedEnvelopeHeader
(
MessageDefect
):
"""A 'Unix-from' header was found in the middle of a header block."""
class
MalformedHeader
(
MessageDefect
):
"""Found a header that was missing a colon, or was otherwise malformed"""
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment