Part of canonical.launchpad.mail
Class | IncomingEmailError | Indicates that something went wrong processing the mail. |
Function | get_main_body | Returns the first text part of the email. |
Function | get_bugtask_type | Returns the specific IBugTask interface the bugtask provides. |
Function | guess_bugtask | Guess which bug task the person intended to edit. |
Function | reformat_wiki_text | Transform moin formatted raw text to readable text. |
Function | parse_commands | Extract indented commands from email body. |
Function | get_person_or_team | Get the Person from the vocabulary. |
Function | ensure_not_weakly_authenticated | Make sure that the current principal is not weakly authenticated. |
Function | ensure_sane_signature_timestamp | Ensure the signature was generated recently but not in the future. |
Returns the specific IBugTask interface the bugtask provides.
>>> from canonical.launchpad.interfaces import ( ... IUpstreamBugTask, IDistroBugTask, IDistroSeriesBugTask) >>> from zope.interface import classImplementsOnly >>> class BugTask: ... pass
When it does, the specific interface is returned:
>>> classImplementsOnly(BugTask, IUpstreamBugTask) >>> get_bugtask_type(BugTask()) #doctest: +ELLIPSIS <...IUpstreamBugTask>>>> classImplementsOnly(BugTask, IDistroBugTask) >>> get_bugtask_type(BugTask()) #doctest: +ELLIPSIS <...IDistroBugTask>>>> classImplementsOnly(BugTask, IDistroSeriesBugTask) >>> get_bugtask_type(BugTask()) #doctest: +ELLIPSIS <...IDistroSeriesBugTask>
Unknown Field: bugtask | has to provide a specific bugtask interface: >>> get_bugtask_type(BugTask()) #doctest: +ELLIPSIS Traceback (most recent call last): ... AssertionError... |
Return None if no bug task could be guessed.
All commands must be indented using either spaces or tabs. They must be listed in command_names -- if not, they are silently ignored.
The special command 'done' terminates processing. It takes no arguments. Any commands that follow it will be ignored. 'done' should not be listed in command_names.
While this syntax is the Launchpad standard, bug #29572 says it should be changed to only accept commands at the beginning and to not require indentation.
A list of (command, args) tuples is returned.
Person
from the vocabulary.Raises | EmailProcessingError if person not found. |