[Spambayes-checkins] spambayes/contrib sb_bnfilter.py,1.2,1.3
Skip Montanaro
montanaro at users.sourceforge.net
Thu Apr 1 19:09:08 EST 2004
Update of /cvsroot/spambayes/spambayes/contrib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13565
Modified Files:
sb_bnfilter.py
Log Message:
fix a typo, reflow some long lines
Index: sb_bnfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/contrib/sb_bnfilter.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sb_bnfilter.py 29 Mar 2004 06:52:39 -0000 1.2
--- sb_bnfilter.py 2 Apr 2004 00:09:05 -0000 1.3
***************
*** 9,13 ****
#
# * while we cant connect to a unix domain socket
! # * fork a seperate process that runs in the background
# * in the child process:
# * exec sb_bnserver. it listens on that same unix domain socket.
--- 9,13 ----
#
# * while we cant connect to a unix domain socket
! # * fork a separate process that runs in the background
# * in the child process:
# * exec sb_bnserver. it listens on that same unix domain socket.
***************
*** 152,156 ****
# the same as stdin was.
if total_size != expected_size:
! print >> sys.stderr, 'size mismatch %d != %d' % (total_size, expected_size)
sys.exit(3)
if error:
--- 152,157 ----
# the same as stdin was.
if total_size != expected_size:
! print >> sys.stderr, 'size mismatch %d != %d' % (total_size,
! expected_size)
sys.exit(3)
if error:
***************
*** 178,184 ****
refused_count += 1
if refused_count == 6:
! # We have been waiting ages and still havent been able to connect. Maybe that socket
! # file has got orphaned. remove it, wait, and try again. We need to allow
! # enough time for sb_bnserver to initialise the rest of spambayes
try:
os.unlink(file)
--- 179,187 ----
refused_count += 1
if refused_count == 6:
! # We have been waiting ages and still havent been able
! # to connect. Maybe that socket file has got
! # orphaned. remove it, wait, and try again. We need to
! # allow enough time for sb_bnserver to initialise the
! # rest of spambayes
try:
os.unlink(file)
***************
*** 205,210 ****
# sys.stderr = sys.__stderr__ = open("/dev/null", "w")
os.setsid()
! # Use exec rather than import here because eventually it may be nice to reimplement this one file in C
! os.execv(sys.executable,[sys.executable, os.path.join(os.path.split(sys.argv[0])[0],'sb_bnserver.py') ]+options)
# should never get here
sys._exit(1)
--- 208,216 ----
# sys.stderr = sys.__stderr__ = open("/dev/null", "w")
os.setsid()
! # Use exec rather than import here because eventually it may be nice to
! # reimplement this one file in C
! os.execv(sys.executable,[sys.executable,
! os.path.join(os.path.split(sys.argv[0])[0],
! 'sb_bnserver.py') ]+options)
# should never get here
sys._exit(1)
More information about the Spambayes-checkins
mailing list