[Spambayes-checkins] spambayes/utilities which_database.py,1.2,1.3

Tony Meyer anadelonbrin at users.sourceforge.net
Wed Sep 24 21:03:50 EDT 2003


Update of /cvsroot/spambayes/spambayes/utilities
In directory sc8-pr-cvs1:/tmp/cvs-serv11651/utilities

Modified Files:
	which_database.py 
Log Message:
Don't use 'str' as a variable name.

Print out a more informative message than "Your database X is a None" when
checking fails.

Index: which_database.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/utilities/which_database.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** which_database.py	16 Aug 2003 07:46:41 -0000	1.2
--- which_database.py	25 Sep 2003 01:03:48 -0000	1.3
***************
*** 79,84 ****
              return
  
!     str = whichdb.whichdb(hammie)
!     if str == "dbhash":
          # could be dbhash or bsddb3
          try:
--- 79,84 ----
              return
  
!     db_type = whichdb.whichdb(hammie)
!     if db_type == "dbhash":
          # could be dbhash or bsddb3
          try:
***************
*** 87,91 ****
              print "Your storage %s is a: bsddb3" % (hammie,)
              return
!     print "Your storage %s is a: %s" % (hammie, str)
  
  if __name__ == "__main__":
--- 87,94 ----
              print "Your storage %s is a: bsddb3" % (hammie,)
              return
!     elif db_type is None:
!         print "Your storage %s either does not exist, or is unreadable." % \
!               (hammie,)
!     print "Your storage %s is a: %s" % (hammie, db_type)
  
  if __name__ == "__main__":





More information about the Spambayes-checkins mailing list