diff options
| author | Barry Warsaw | 2007-09-21 08:51:38 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2007-09-21 08:51:38 -0400 |
| commit | 65c64773d910b3b2a3e2a9b9db4669e57170ece2 (patch) | |
| tree | 1bb742b2dc5898e569e19d8967e8d51a5d5c0352 /Mailman/Handlers/Replybot.py | |
| parent | 892316be3c09eec4a1f8117bfd9eb44bba1c9117 (diff) | |
| download | mailman-65c64773d910b3b2a3e2a9b9db4669e57170ece2.tar.gz mailman-65c64773d910b3b2a3e2a9b9db4669e57170ece2.tar.zst mailman-65c64773d910b3b2a3e2a9b9db4669e57170ece2.zip | |
Diffstat (limited to 'Mailman/Handlers/Replybot.py')
| -rw-r--r-- | Mailman/Handlers/Replybot.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Mailman/Handlers/Replybot.py b/Mailman/Handlers/Replybot.py index 18fc83ced..7017d9dd5 100644 --- a/Mailman/Handlers/Replybot.py +++ b/Mailman/Handlers/Replybot.py @@ -19,6 +19,7 @@ import time import logging +import datetime from string import Template @@ -29,6 +30,7 @@ from Mailman.i18n import _ log = logging.getLogger('mailman.error') __i18n_templates__ = True +NODELTA = datetime.timedelta() @@ -63,7 +65,7 @@ def process(mlist, msg, msgdata): sender = msg.get_sender() now = time.time() graceperiod = mlist.autoresponse_graceperiod - if graceperiod > 0 and ack <> 'yes': + if graceperiod > NODELTA and ack <> 'yes': if toadmin: quiet_until = mlist.admin_responses.get(sender, 0) elif torequest: @@ -79,7 +81,7 @@ def process(mlist, msg, msgdata): 'Auto-response for your message to the "$realname" mailing list') # Do string interpolation into the autoresponse text d = dict(listname = realname, - listurl = mlist.GetScriptURL('listinfo'), + listurl = mlist.script_url('listinfo'), requestemail = mlist.request_address, owneremail = mlist.owner_address, ) @@ -98,7 +100,7 @@ def process(mlist, msg, msgdata): outmsg['X-Ack'] = 'No' outmsg.send(mlist) # update the grace period database - if graceperiod > 0: + if graceperiod > NODELTA: # graceperiod is in days, we need # of seconds quiet_until = now + graceperiod * 24 * 60 * 60 if toadmin: |
