changeset 4133:251827af7ddc

Fixed: cannot check for File.Error in same line like checking import of File
author Florian Krupicka <florian.krupicka@googlemail.com>
date Tue, 27 May 2008 18:13:17 +0200
parents a54a08994dcb
children 719256a8db51
files MoinMoin/util/filesys.py
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/util/filesys.py	Sun May 25 23:16:51 2008 +0200
+++ b/MoinMoin/util/filesys.py	Tue May 27 18:13:17 2008 +0200
@@ -212,8 +212,11 @@
         """
         try:
             from Carbon import File
-            return File.FSRef(path).as_pathname()
-        except (ImportError, File.Error):
+            try:
+                return File.FSRef(path).as_pathname()
+            except File.Error:
+                return None
+        except ImportError:
             return None
 
 else: