[Zope3-checkins] SVN: Zope3/trunk/src/zope/server/ftp/tests/demofs.py If the file does not exist, it is simply not writable. No OSError needed.

Shane Hathaway shane at zope.com
Mon Sep 6 21:45:52 EDT 2004


Log message for revision 27459:
  If the file does not exist, it is simply not writable.  No OSError needed.
  


Changed:
  U   Zope3/trunk/src/zope/server/ftp/tests/demofs.py


-=-
Modified: Zope3/trunk/src/zope/server/ftp/tests/demofs.py
===================================================================
--- Zope3/trunk/src/zope/server/ftp/tests/demofs.py	2004-09-07 01:32:54 UTC (rev 27458)
+++ Zope3/trunk/src/zope/server/ftp/tests/demofs.py	2004-09-07 01:45:52 UTC (rev 27459)
@@ -278,7 +278,10 @@
     def writable(self, path):
         "See zope.server.interfaces.ftp.IFileSystem"
         path, name = posixpath.split(path)
-        d = self.getdir(path)
+        try:
+            d = self.getdir(path)
+        except OSError:
+            return False
         if name not in d:
             return d.accessable(self.user, write)
         f = d[name]



More information about the Zope3-Checkins mailing list