[Spambayes-checkins] spambayes/contrib SmarterHTTPServer.py,1.1,1.2 bulkgraph.py,1.2,1.3

Anthony Baxter anthonybaxter at users.sourceforge.net
Tue Jan 28 19:23:36 EST 2003


Update of /cvsroot/spambayes/spambayes/contrib
In directory sc8-pr-cvs1:/tmp/cvs-serv9465/contrib

Modified Files:
	SmarterHTTPServer.py bulkgraph.py 
Log Message:
Whitespace n11n
(if localization can be l10n, normalization can be n11n :)


Index: SmarterHTTPServer.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/contrib/SmarterHTTPServer.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** SmarterHTTPServer.py	24 Jan 2003 20:34:05 -0000	1.1
--- SmarterHTTPServer.py	29 Jan 2003 03:23:34 -0000	1.2
***************
*** 37,41 ****
  
      server_version = "SmarterHTTP/" + __version__
!     
  
      def send_head(self):
--- 37,41 ----
  
      server_version = "SmarterHTTP/" + __version__
! 
  
      def send_head(self):
***************
*** 63,67 ****
                  else:
                      return self.list_directory(path)
!                 
          ctype = self.guess_type(path)
  
--- 63,67 ----
                  else:
                      return self.list_directory(path)
! 
          ctype = self.guess_type(path)
  
***************
*** 87,91 ****
              if parms:
                  pdict = cgi.parse_qs(parms, False)
!             
              # ctype application/method methlets (invented here) may
              # send whatever headers they like.  However, the server has
--- 87,91 ----
              if parms:
                  pdict = cgi.parse_qs(parms, False)
! 
              # ctype application/method methlets (invented here) may
              # send whatever headers they like.  However, the server has
***************
*** 95,99 ****
              # anything incompatible with text/html type.  Methlets should
              # not invoke end_headers().
!                         
              if hasattr(self, methname):
                  self.send_response(200)
--- 95,99 ----
              # anything incompatible with text/html type.  Methlets should
              # not invoke end_headers().
! 
              if hasattr(self, methname):
                  self.send_response(200)

Index: bulkgraph.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/contrib/bulkgraph.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** bulkgraph.py	27 Jan 2003 22:03:46 -0000	1.2
--- bulkgraph.py	29 Jan 2003 03:23:34 -0000	1.3
***************
*** 123,127 ****
  
      global loud
!     
      try:
          opts, args = getopt.getopt(sys.argv[1:], 'hfqd:D:s:e:')
--- 123,127 ----
  
      global loud
! 
      try:
          opts, args = getopt.getopt(sys.argv[1:], 'hfqd:D:s:e:')
***************
*** 196,210 ****
              age = 2 * expire
              try:
!                  received = (msg.get_all("Received"))[0]
!                  received = date_re.search(received).group(1)
!                  # if loud: print "  %s" % received
!                  date = time.mktime(time.strptime(received, "%d %b %Y"))
!                  # if loud: print "  %d" % date
!                  age = (now - date) // day
!                  # Can't just continue here... we're in a try
!                  if age < 0:
!                      age = 2 * expire
              except:
!                  pass
              # Skip anything that has no date or is too old or from the future
              # if loud: print "%s: %d" % (name, age)
--- 196,210 ----
              age = 2 * expire
              try:
!                 received = (msg.get_all("Received"))[0]
!                 received = date_re.search(received).group(1)
!                 # if loud: print "  %s" % received
!                 date = time.mktime(time.strptime(received, "%d %b %Y"))
!                 # if loud: print "  %d" % date
!                 age = (now - date) // day
!                 # Can't just continue here... we're in a try
!                 if age < 0:
!                     age = 2 * expire
              except:
!                 pass
              # Skip anything that has no date or is too old or from the future
              # if loud: print "%s: %d" % (name, age)
***************
*** 243,247 ****
                      sys.stdout.write("h")
                      sys.stdout.flush()
!             
              h.train(msg, isspam)
  
--- 243,247 ----
                      sys.stdout.write("h")
                      sys.stdout.flush()
! 
              h.train(msg, isspam)
  





More information about the Spambayes-checkins mailing list