]> granicus.if.org Git - python/commitdiff
fixed tag generation to avoid null tags
authorPiers Lauder <piers@cs.su.oz.au>
Tue, 5 Jul 2005 04:20:07 +0000 (04:20 +0000)
committerPiers Lauder <piers@cs.su.oz.au>
Tue, 5 Jul 2005 04:20:07 +0000 (04:20 +0000)
Lib/imaplib.py

index 3914c393e5f6c69197ec5816d0d0bcb63ecbafec..3e829d5dcf6732cf4e9da6467d14899b7c325075 100644 (file)
@@ -20,7 +20,7 @@ Public functions:       Internaldate2tuple
 # PROXYAUTH contributed by Rick Holbert <holbert.13@osu.edu> November 2002.
 # GET/SETANNOTATION contributed by Tomas Lindroos <skitta@abo.fi> June 2005.
 
-__version__ = "2.56"
+__version__ = "2.57"
 
 import binascii, os, random, re, socket, sys, time
 
@@ -165,7 +165,7 @@ class IMAP4:
         # Create unique tag for this session,
         # and compile tagged response matcher.
 
-        self.tagpre = Int2AP(random.randint(0, 31999))
+        self.tagpre = Int2AP(random.randint(4096, 65535))
         self.tagre = re.compile(r'(?P<tag>'
                         + self.tagpre
                         + r'\d+) (?P<type>[A-Z]+) (?P<data>.*)')