[Python-checkins] python/dist/src/Lib/email Generator.py,1.12,1.13

bwarsaw@users.sourceforge.net bwarsaw@users.sourceforge.net
2002年7月19日 15:21:05 -0700


Update of /cvsroot/python/python/dist/src/Lib/email
In directory usw-pr-cvs1:/tmp/cvs-serv7083/email
Modified Files:
	Generator.py 
Log Message:
_dispatch(): Use the new Message.get_content_type() method as hashed
out on the mimelib-devel list.
Index: Generator.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/email/Generator.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** Generator.py	11 Jul 2002 18:48:40 -0000	1.12
--- Generator.py	19 Jul 2002 22:21:02 -0000	1.13
***************
*** 124,133 ****
 # full MIME type, then dispatch to self._handle_<maintype>(). If
 # that's missing too, then dispatch to self._writeBody().
! ctype = msg.get_type()
! if ctype is None:
! # No Content-Type: header so use the default type, which must be
! # either text/plain or message/rfc822.
! ctype = msg.get_default_type()
! assert ctype in ('text/plain', 'message/rfc822')
 # We do have a Content-Type: header.
 main, sub = ctype.split('/')
--- 124,128 ----
 # full MIME type, then dispatch to self._handle_<maintype>(). If
 # that's missing too, then dispatch to self._writeBody().
! ctype = msg.get_content_type()
 # We do have a Content-Type: header.
 main, sub = ctype.split('/')

AltStyle によって変換されたページ (->オリジナル) /