diff options
| author | Barry Warsaw | 2009-05-16 11:08:46 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2009-05-16 11:08:46 -0400 |
| commit | 7e23b2f358806cb14b92dc7833ce773738534d41 (patch) | |
| tree | 5499b536a163ebb4dedab62f4f7a97b460cece18 /src/mailman/pipeline/scrubber.py | |
| parent | ad07de3dcdbf0ef11b5b324b9521b748da207fc7 (diff) | |
| download | mailman-7e23b2f358806cb14b92dc7833ce773738534d41.tar.gz mailman-7e23b2f358806cb14b92dc7833ce773738534d41.tar.zst mailman-7e23b2f358806cb14b92dc7833ce773738534d41.zip | |
Diffstat (limited to 'src/mailman/pipeline/scrubber.py')
| -rw-r--r-- | src/mailman/pipeline/scrubber.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mailman/pipeline/scrubber.py b/src/mailman/pipeline/scrubber.py index 18d50c7a5..e5510e0ab 100644 --- a/src/mailman/pipeline/scrubber.py +++ b/src/mailman/pipeline/scrubber.py @@ -49,6 +49,7 @@ from mailman.core.errors import DiscardMessage from mailman.i18n import _ from mailman.interfaces.handler import IHandler from mailman.utilities.filesystem import makedirs +from mailman.utilities.modules import find_name # Path characters for common platforms @@ -487,14 +488,12 @@ def save_attachment(mlist, msg, dir, filter_html=True): fp.close() # Now calculate the url to the list's archive. scrubber_path = config.scrubber.archive_scrubber - package, dot, module_name = scrubber_path.rpartition('.') - __import__(package) - baseurl = getattr(sys.modules[package], module_name).list_url(mlist) - if not baseurl.endswith('/'): - baseurl += '/' + base_url = find_name(scrubber_path).list_url(mlist) + if not base_url.endswith('/'): + base_url += '/' # Trailing space will definitely be a problem with format=flowed. # Bracket the URL instead. - url = '<' + baseurl + '%s/%s%s%s>' % (dir, filebase, extra, ext) + url = '<' + base_url + '%s/%s%s%s>' % (dir, filebase, extra, ext) return url |
