[Python-checkins] CVS: python/dist/src/Lib/email Message.py,1.4,1.5

Barry Warsaw bwarsaw@users.sourceforge.net
Tue, 09 Oct 2001 08:48:34 -0700


Update of /cvsroot/python/python/dist/src/Lib/email
In directory usw-pr-cvs1:/tmp/cvs-serv8730/Lib/email

Modified Files:
	Message.py 
Log Message:
get_all(): We never returned failobj if we found no matching headers.
Fix that, and also make the docstring describe failobj.


Index: Message.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Message.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Message.py	2001/10/04 17:05:11	1.4
--- Message.py	2001/10/09 15:48:29	1.5
***************
*** 228,231 ****
--- 228,233 ----
          message, and may contain duplicates.  Any fields deleted and
          re-inserted are alwyas appended to the header list.
+ 
+         If no such fields exist, failobj is returned (defaults to None).
          """
          values = []
***************
*** 234,237 ****
--- 236,241 ----
              if k.lower() == name:
                  values.append(v)
+         if not values:
+             return failobj
          return values