Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2dfc168

Browse files
author
Piers Lauder
committed
fixed tag generation to avoid null tags
1 parent 9e43acf commit 2dfc168

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/imaplib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# PROXYAUTH contributed by Rick Holbert <[email protected]> November 2002.
2121
# GET/SETANNOTATION contributed by Tomas Lindroos <[email protected]> June 2005.
2222

23-
__version__ = "2.56"
23+
__version__ = "2.57"
2424

2525
import binascii, os, random, re, socket, sys, time
2626

@@ -165,7 +165,7 @@ def __init__(self, host = '', port = IMAP4_PORT):
165165
# Create unique tag for this session,
166166
# and compile tagged response matcher.
167167

168-
self.tagpre = Int2AP(random.randint(0, 31999))
168+
self.tagpre = Int2AP(random.randint(4096, 65535))
169169
self.tagre = re.compile(r'(?P<tag>'
170170
+ self.tagpre
171171
+ r'\d+) (?P<type>[A-Z]+) (?P<data>.*)')

0 commit comments

Comments
 (0)