[Spambayes-checkins] spambayes/scripts sb_mboxtrain.py, 1.11,
1.11.4.1
Tony Meyer
anadelonbrin at users.sourceforge.net
Thu Jun 10 01:21:18 EDT 2004
Update of /cvsroot/spambayes/spambayes/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2516/scripts
Modified Files:
Tag: release_1_0-branch
sb_mboxtrain.py
Log Message:
Backport fix for [ 942262 ] TypeError: string payload expected: <type 'list'>
Index: sb_mboxtrain.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_mboxtrain.py,v
retrieving revision 1.11
retrieving revision 1.11.4.1
diff -C2 -d -r1.11 -r1.11.4.1
*** sb_mboxtrain.py 5 Feb 2004 08:13:26 -0000 1.11
--- sb_mboxtrain.py 10 Jun 2004 05:21:16 -0000 1.11.4.1
***************
*** 51,55 ****
import sys, os, getopt, email
import shutil
! from spambayes import hammie, storage
from spambayes.Options import options, get_pathname_option
--- 51,55 ----
import sys, os, getopt, email
import shutil
! from spambayes import hammie, storage, mboxutils
from spambayes.Options import options, get_pathname_option
***************
*** 83,87 ****
# multipart/alternative?
try:
! msg.as_string()
except TypeError:
# We'll be unable to represent this as text :(
--- 83,87 ----
# multipart/alternative?
try:
! mboxutils.as_string(msg)
except TypeError:
# We'll be unable to represent this as text :(
***************
*** 145,149 ****
continue
f = file(tfn, "wb")
! f.write(msg.as_string())
f.close()
shutil.copystat(cfn, tfn)
--- 145,149 ----
continue
f = file(tfn, "wb")
! f.write(mboxutils.as_string(msg))
f.close()
shutil.copystat(cfn, tfn)
***************
*** 190,194 ****
if options["Headers", "include_trained"]:
# Write it out with the Unix "From " line
! outf.write(msg.as_string(True))
if options["Headers", "include_trained"]:
--- 190,194 ----
if options["Headers", "include_trained"]:
# Write it out with the Unix "From " line
! outf.write(mboxutils.as_string(msg, True))
if options["Headers", "include_trained"]:
***************
*** 246,250 ****
continue
f = file(tfn, "wb")
! f.write(msg.as_string())
f.close()
shutil.copystat(cfn, tfn)
--- 246,250 ----
continue
f = file(tfn, "wb")
! f.write(mboxutils.as_string(msg))
f.close()
shutil.copystat(cfn, tfn)
More information about the Spambayes-checkins
mailing list