diff options
| author | bwarsaw | 2003-09-12 13:30:20 +0000 |
|---|---|---|
| committer | bwarsaw | 2003-09-12 13:30:20 +0000 |
| commit | 021832d89f23c62b0626679b3d6e868f5e981263 (patch) | |
| tree | d279e5d3859ef2848a945fc1ba62287dc08bbe59 | |
| parent | e9a7f249196d0efa5a621cd02ab32572da2455ee (diff) | |
| download | mailman-021832d89f23c62b0626679b3d6e868f5e981263.tar.gz mailman-021832d89f23c62b0626679b3d6e868f5e981263.tar.zst mailman-021832d89f23c62b0626679b3d6e868f5e981263.zip | |
True/False where appropriate.
Fixed the import of Stop, which was causing the import of this message
to fail. The symptom was this traceback message in logs/error:
AttributeError: 'module' object has no attribute 'process'
| -rw-r--r-- | Mailman/Bouncers/DSN.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Mailman/Bouncers/DSN.py b/Mailman/Bouncers/DSN.py index 95037aad6..666281c60 100644 --- a/Mailman/Bouncers/DSN.py +++ b/Mailman/Bouncers/DSN.py @@ -24,7 +24,13 @@ from email.Iterators import typed_subpart_iterator from email.Utils import parseaddr from cStringIO import StringIO -from Mailman.BouncerAPI import Stop +from Mailman.Bouncers.BouncerAPI import Stop + +try: + True, False +except NameError: + True = 1 + False = 0 @@ -52,11 +58,11 @@ def check(msg): # Some non-permanent failure, so ignore this block continue params = [] - foundp = 0 + foundp = False for header in ('original-recipient', 'final-recipient'): for k, v in msgblock.get_params([], header): if k.lower() == 'rfc822': - foundp = 1 + foundp = True else: params.append(k) if foundp: @@ -68,7 +74,7 @@ def check(msg): for a in addrs: if a is not None: realname, a = parseaddr(a) - rtnaddrs[a] = 1 + rtnaddrs[a] = True return rtnaddrs.keys() |
