[Spambayes-checkins] spambayes/utilities which_database.py,1.3,1.4
Tony Meyer
anadelonbrin at users.sourceforge.net
Fri Sep 26 00:23:51 EDT 2003
Update of /cvsroot/spambayes/spambayes/utilities
In directory sc8-pr-cvs1:/tmp/cvs-serv11439/utilities
Modified Files:
which_database.py
Log Message:
Distinguish between a database not existing yet and not being able to be read.
Index: which_database.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/utilities/which_database.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** which_database.py 25 Sep 2003 01:03:48 -0000 1.3
--- which_database.py 26 Sep 2003 04:23:49 -0000 1.4
***************
*** 79,82 ****
--- 79,85 ----
return
+ if not os.path.exists(hammie):
+ print "Your storage file does not exist yet."
+ return
db_type = whichdb.whichdb(hammie)
if db_type == "dbhash":
***************
*** 88,93 ****
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)
--- 91,95 ----
return
elif db_type is None:
! print "Your storage %s is unreadable." % (hammie,)
print "Your storage %s is a: %s" % (hammie, db_type)
More information about the Spambayes-checkins
mailing list