[Spambayes-checkins] spambayes/scripts sb_server.py,1.21,1.22

Tony Meyer anadelonbrin at users.sourceforge.net
Fri Jul 9 11:26:24 CEST 2004


Update of /cvsroot/spambayes/spambayes/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22512/scripts

Modified Files:
	sb_server.py 
Log Message:
Drat.  Using -u on the command line with sb_server hasn't worked for a while
(Hmm...I guess the tests should be *run* occasionally, too!).  We need to set
these options in the constructor, not in init(), because init gets called after we
load in the command line args.

This does mean that any changes to the option values need to be also updated
in state, or a new state has to be made, rather than calling init(), but I believe
we always do this anyway.  In addition, most of these are values that only really
apply to starting up from the command line.

Fixes part of [ 981970 ] tests failing

Index: sb_server.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/scripts/sb_server.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** sb_server.py	16 Mar 2004 05:08:31 -0000	1.21
--- sb_server.py	9 Jul 2004 09:26:21 -0000	1.22
***************
*** 640,643 ****
--- 640,651 ----
          self.init()
  
+         # Load up the other settings from Option.py / bayescustomize.ini
+         self.uiPort = options["html_ui", "port"]
+         self.launchUI = options["html_ui", "launch_browser"]
+         self.gzipCache = options["Storage", "cache_use_gzip"]
+         self.cacheExpiryDays = options["Storage", "cache_expiry_days"]
+         self.runTestServer = False
+         self.isTest = False
+ 
      def init(self):
          assert not self.prepared, "init after prepare, but before close"
***************
*** 664,675 ****
              sys.exit()
  
-         # Load up the other settings from Option.py / bayescustomize.ini
-         self.uiPort = options["html_ui", "port"]
-         self.launchUI = options["html_ui", "launch_browser"]
-         self.gzipCache = options["Storage", "cache_use_gzip"]
-         self.cacheExpiryDays = options["Storage", "cache_expiry_days"]
-         self.runTestServer = False
-         self.isTest = False
- 
          # Set up the statistics.
          self.totalSessions = 0
--- 672,675 ----



More information about the Spambayes-checkins mailing list