summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiers Lauder <piers@cs.su.oz.au>2005-07-05 04:20:07 (GMT)
committerPiers Lauder <piers@cs.su.oz.au>2005-07-05 04:20:07 (GMT)
commit2dfc168bc3b92a0087a3a619b7f793240528936a (patch)
treee7b5fa88490eb255b13c6d27a13c4ce2852399db
parent9e43acf2f31e67a976475c2c9f8674dd27571cc6 (diff)
downloadcpython-2dfc168bc3b92a0087a3a619b7f793240528936a.zip
cpython-2dfc168bc3b92a0087a3a619b7f793240528936a.tar.gz
cpython-2dfc168bc3b92a0087a3a619b7f793240528936a.tar.bz2
fixed tag generation to avoid null tags
-rw-r--r--Lib/imaplib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/imaplib.py b/Lib/imaplib.py
index 3914c39..3e829d5 100644
--- a/Lib/imaplib.py
+++ b/Lib/imaplib.py
@@ -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>.*)')