[xiph-cvs] r6473 - trunk/positron/scripts
volsung at xiph.org
volsung at xiph.org
Tue Mar 30 08:30:55 PST 2004
Author: volsung
Date: 2004-03-30 11:30:54 -0500 (Tue, 30 Mar 2004)
New Revision: 6473
Modified:
trunk/positron/scripts/positron
Log:
Let's reorganize the database directory testing to deal with a common
failure mode in a friendlier way.
<p>Modified: trunk/positron/scripts/positron
===================================================================
--- trunk/positron/scripts/positron 2004-03-30 16:23:37 UTC (rev 6472)
+++ trunk/positron/scripts/positron 2004-03-30 16:30:54 UTC (rev 6473)
@@ -151,17 +151,28 @@
try:
- # Another special case since "rebuild" can be called when there
- # is no db dir present. Creating the dir before creating the
- # Neuros object will ensure that no exceptions are thrown.
- if remaining[0] == "rebuild":
- dbdir = path.join(config.mountpoint, Neuros.DB_DIR)
- if not path.exists(dbdir):
+ dbdir = path.join(config.mountpoint, Neuros.DB_DIR)
+ if not path.exists(dbdir):
+ if remaining[0] == "rebuild":
+ # Another special case since "rebuild" can be called when there
+ # is no db dir present. Creating the dir before creating the
+ # Neuros object will ensure that no exceptions are thrown.
os.mkdir(dbdir)
- elif not path.isdir(dbdir):
- print "Error: There is file called %s where the database directory" % (dbdir,)
- print "must go. Please remove it and rerun 'positron rebuild'."
+ else:
+ print "Error: No Neuros database directory is present at %s." \
+ % (dbdir,)
+ print "To correct this: "
+ print "1) Verify your Neuros is mounted at %s." \
+ % (config.mountpoint,)
+ print "2) If it is mounted there, but there is no %s directory,"\
+ % (dbdir)
+ print " run 'positron rebuild' to generate a new database."
sys.exit(1)
+
+ elif not path.isdir(dbdir):
+ print "Error: There is file called %s where the database directory" % (dbdir,)
+ print "must go. Please remove it and rerun 'positron rebuild'."
+ sys.exit(1)
myNeuros = Neuros(config.mountpoint)
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the commits
mailing list