Skip to content

Commit 6e1a4a1

Browse files
committed
update
1 parent 708e2cd commit 6e1a4a1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

Mailman/Queue/Switchboard.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -664,3 +664,13 @@ def cleanup_stale_locks(self):
664664
pass
665665
except OSError as e:
666666
mailman_log('error', 'Error cleaning up stale locks: %s', str(e))
667+
668+
def _make_filebase(self, msg, msgdata):
669+
import hashlib
670+
import time
671+
msgid = msg.get('message-id', '')
672+
listname = msgdata.get('listname', '--nolist--')
673+
now = time.time()
674+
hash_input = (str(msgid) + str(listname) + str(now)).encode('utf-8')
675+
digest = hashlib.sha1(hash_input).hexdigest()
676+
return "%d+%s" % (int(now), digest)

0 commit comments

Comments
 (0)