diff options
Diffstat (limited to 'Mailman/Utils.py')
| -rw-r--r-- | Mailman/Utils.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py index d79d3543a..a1a4ee724 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -437,9 +437,15 @@ def FindMatchingAddresses(name, dict, *dicts): def GetRandomSeed(): - chr1 = int(random.random() * 57) + 65 - chr2 = int(random.random() * 57) + 65 - return "%c%c" % (chr1, chr2) + chr1 = int(random.random() * 52) + chr2 = int(random.random() * 52) + def mkletter(c): + if 0 <= c < 26: + c = c + 65 + if 26 <= c < 52: + c = c - 26 + 97 + return c + return "%c%c" % tuple(map(mkletter, (chr1, chr2))) def SnarfMessage(msg): |
