IArchiver.archive_message implementations return None

Bug #1203359 reported by Stephen Turnbull on 2013-07-20
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
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".

Saprative (saprativejana) wrote :

can you explain this to me in a little detail.

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) on 2015-04-28
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers