From: Piers Lauder Date: Tue, 5 Jul 2005 04:20:07 +0000 (+0000) Subject: fixed tag generation to avoid null tags X-Git-Tag: v2.5a0~1614 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2dfc168bc3b92a0087a3a619b7f793240528936a;p=thirdparty%2FPython%2Fcpython.git fixed tag generation to avoid null tags --- diff --git a/Lib/imaplib.py b/Lib/imaplib.py index 3914c393e5f6..3e829d5dcf67 100644 --- a/Lib/imaplib.py +++ b/Lib/imaplib.py @@ -20,7 +20,7 @@ Public functions: Internaldate2tuple # PROXYAUTH contributed by Rick Holbert November 2002. # GET/SETANNOTATION contributed by Tomas Lindroos 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' + self.tagpre + r'\d+) (?P[A-Z]+) (?P.*)')