[Python-checkins] python/dist/src/Lib imaplib.py,1.73,1.74
pierslauder at users.sourceforge.net
pierslauder at users.sourceforge.net
Fri Oct 8 06:05:42 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19775/dist/src/Lib
Modified Files:
imaplib.py
Log Message:
Fix bug in _checkquote that raised an exception on empty "arg".
Index: imaplib.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/imaplib.py,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -d -r1.73 -r1.74
--- imaplib.py 27 Sep 2004 15:29:02 -0000 1.73
+++ imaplib.py 8 Oct 2004 04:05:39 -0000 1.74
@@ -1008,9 +1008,9 @@
if type(arg) is not type(''):
return arg
- if (arg[0],arg[-1]) in (('(',')'),('"','"')):
+ if len(arg) >= 2 and (arg[0],arg[-1]) in (('(',')'),('"','"')):
return arg
- if self.mustquote.search(arg) is None:
+ if arg and self.mustquote.search(arg) is None:
return arg
return self._quote(arg)
More information about the Python-checkins
mailing list