1 |
--- mailman-2.1.5.1/Mailman/Handlers/Scrubber.py.getfilename 2006-07-25 13:14:53.000000000 +0200 |
2 |
+++ mailman-2.1.5.1/Mailman/Handlers/Scrubber.py 2006-07-25 13:16:24.000000000 +0200 |
3 |
@@ -269,7 +269,10 @@ |
4 |
os.umask(omask) |
5 |
desc = part.get('content-description', _('not available')) |
6 |
try: |
7 |
- filename = part.get_filename(_('not available')) |
8 |
+ try: |
9 |
+ filename = part.get_filename(_('not available')) |
10 |
+ except: |
11 |
+ filename = _('not available') |
12 |
except ValueError: |
13 |
# Hack to deal with filename containing ' character. |
14 |
filename = _('not available') |
15 |
@@ -364,7 +367,7 @@ |
16 |
ctype = msg.get_content_type() |
17 |
try: |
18 |
fnext = os.path.splitext(msg.get_filename(''))[1] |
19 |
- except ValueError: |
20 |
+ except: |
21 |
# Catch the case when msg.get_filename('') fails with a |
22 |
# ValueError: need more than 2 values to unpack |
23 |
# File "/usr/lib/python2.4/email/Utils.py", line 222, in decode_rfc2231 |
24 |
@@ -391,7 +394,7 @@ |
25 |
# necessary. |
26 |
try: |
27 |
filename = msg.get_filename() |
28 |
- except ValueError: |
29 |
+ except: |
30 |
# Another case of catching filenames that contain a ' character. |
31 |
filename = '' |
32 |
if not filename: |