IArchiver.archive_message implementations return None

Bug #1203359 reported by Stephen Turnbull
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Undecided
Unassigned

Bug Description

The Interface sez:

    def archive_message(mlist, msg):
        """Send the message to the archiver.

        :param mlist: The IMailingList object.
        :param msg: The message object.
        :returns: The url string or None if the message's archive url cannot
            be calculated.
        """

but none of prototype, MHonArch, and mailarchive return anything.

I think the Interface should be changed to say ":returns: None".

Tags: mailman3
Revision history for this message
Saprative (saprativejana) wrote :

can you explain this to me in a little detail.

Revision history for this message
Barry Warsaw (barry) wrote :

While the built-in archivers do currently return None, it is possible that more information can be provided about the archived message. That's why the interface leaves it open to return the archive url if available.

It's possible MHonArc could be made to do this; contributions welcome.

It's possible the prototype archiver could do this as well. Happy to take a contribution for this too.

For now, the interface is right, but the existing IArchiver implementations should be explicit in their return of None. We don't want to rely on Python's implicit return of None. I'll make that fix.

tags: added: mailman3
Changed in mailman:
milestone: none → 3.0.0b6
status: New → Fix Committed
Barry Warsaw (barry)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.