[xiph-cvs] cvs commit: positron/positron neuros.py

Stan Seibert volsung at xiph.org
Sat Mar 6 21:04:06 PST 2004



volsung     04/03/07 00:04:06

  Modified:    positron neuros.py
  Log:
  Second try at dealing with cases.

Revision  Changes    Path
1.7       +7 -1      positron/positron/neuros.py

Index: neuros.py
===================================================================
RCS file: /usr/local/cvsroot/positron/positron/neuros.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- neuros.py	7 Mar 2004 04:56:08 -0000	1.6
+++ neuros.py	7 Mar 2004 05:04:06 -0000	1.7
@@ -123,10 +123,16 @@
         # Check and see if the mountpoint looks legit
         try:
             contents = os.listdir(self.mountpoint)
-            if Neuros.DB_DIR not in map(string.upper, contents):
+            for name in contents:
+                if name.upper() == Neuros.DB_DIR.upper():
+                    # Make sure to save the proper case of the mountpoint
+                    Neuros.DB_DIR = name
+                    break
+            else:
                 raise Error("The mountpoint %s does not appear to contain"
                             " a %s database directory."
                             % (mountpoint, Neuros.DB_DIR))
+            
         except OSError:
             raise Error("The mountpoint %s is not accessible."
                         "  Please check your permissions."

<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