[ mailman-Patches-747470 ] crash due to unrecognized mime type

SourceForge.net noreply at sourceforge.net
Mon Jun 9 14:40:15 EDT 2003


Patches item #747470, was opened at 2003-06-02 07:22
Message generated for change (Comment added) made by bwarsaw
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=747470&group_id=103

Category: None
Group: Mailman 2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Sjoerd Mullender (sjoerd)
Assigned to: Nobody/Anonymous (nobody)
Summary: crash due to unrecognized mime type

Initial Comment:
Cron sent me a message with this stack trace.  The
problem is due to the fact that I'm using Python 2.3b1
with its version of guess_all_extensions which can
return None.  The replacement version in Scrubber.py
never returns None.  A simple patch is attached.

Traceback (most recent call last):
  File "/var/mailman/cron/senddigests", line 94, in ?
    main()
  File "/var/mailman/cron/senddigests", line 86, in main
    mlist.send_digest_now()
  File "/var/mailman/Mailman/Digester.py", line 60, in
send_digest_now
    ToDigest.send_digests(self, mboxfp)
  File "/var/mailman/Mailman/Handlers/ToDigest.py",
line 130, in send_digests
    send_i18n_digests(mlist, mboxfp)
  File "/var/mailman/Mailman/Handlers/ToDigest.py",
line 303, in send_i18n_digests
    msg = scrubber(mlist, msg)
  File "/var/mailman/Mailman/Handlers/Scrubber.py",
line 257, in process
    url = save_attachment(mlist, part, dir)
  File "/var/mailman/Mailman/Handlers/Scrubber.py",
line 349, in save_attachment
    ext = guess_extension(ctype, fnext)
  File "/var/mailman/Mailman/Handlers/Scrubber.py",
line 80, in guess_extension
    if ext in all:
TypeError: iterable argument required


----------------------------------------------------------------------

>Comment By: Barry A. Warsaw (bwarsaw)
Date: 2003-06-09 16:40

Message:
Logged In: YES 
user_id=12800

I wonder if the interface for guess_all_extensions() isn't
broken in Python 2.3?  I mean, why not just return an empty
list if there are no extensions found?  What advantage does
returning None buy you?

I'd opt for changing (read: fixing :) Python 2.3's
guess_all_extensions().


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=300103&aid=747470&group_id=103



More information about the Mailman-coders mailing list