l.b.b.b.BugAttachmentContentCheck : class documentation

Part of lp.bugs.browser.bugattachment View In Hierarchy

Known subclasses: lp.bugs.browser.bugattachment.BugAttachmentEditView, lp.bugs.browser.bugmessage.BugMessageAddFormView

A mixin class that checks the consistency of patch flag and file type.
Method guessContentType Guess the content type a file with the given name and content.
Method attachmentTypeConsistentWithContentType Return True iff patch_flag is consistent with filename and content.
Method nextUrlForInconsistentPatchFlags The next_url value used for an inconistent patch flag.
def guessContentType(self, filename, file_content):
Guess the content type a file with the given name and content.
def attachmentTypeConsistentWithContentType(self, patch_flag_set, filename, file_content):
Return True iff patch_flag is consistent with filename and content.
def nextUrlForInconsistentPatchFlags(self, attachment):
The next_url value used for an inconistent patch flag.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.