[xiph-cvs] cvs commit: positron/positron neuros.py
Stan Seibert
volsung at xiph.org
Sat Mar 6 20:56:09 PST 2004
volsung 04/03/06 23:56:09
Modified: positron neuros.py
Log:
One (of many, probably) fixes required to deal more gracefully with case
sensitive vfat mounts.
Revision Changes Path
1.6 +8 -3 positron/positron/neuros.py
Index: neuros.py
===================================================================
RCS file: /usr/local/cvsroot/positron/positron/neuros.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- neuros.py 6 Sep 2003 23:35:09 -0000 1.5
+++ neuros.py 7 Mar 2004 04:56:08 -0000 1.6
@@ -20,6 +20,7 @@
from os import path
import util
import ports
+import string
class Error(Exception):
"""Base class for exceptions in this module."""
@@ -120,11 +121,15 @@
self.mountpoint = path.abspath(mountpoint)
# Check and see if the mountpoint looks legit
- dbpath = path.join(self.mountpoint, Neuros.DB_DIR)
try:
- os.listdir(dbpath)
+ contents = os.listdir(self.mountpoint)
+ if Neuros.DB_DIR not in map(string.upper, contents):
+ raise Error("The mountpoint %s does not appear to contain"
+ " a %s database directory."
+ % (mountpoint, Neuros.DB_DIR))
except OSError:
- raise Error("%s does not look like a Neuros mountpoint"
+ raise Error("The mountpoint %s is not accessible."
+ " Please check your permissions."
% (mountpoint,))
# Handy to keep around
<p><p>--- >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