Improve handling of file-not-found in remote storage layer.
[cumulus.git] / python / cumulus / store / file.py
index 6034835..6b16fb6 100644 (file)
@@ -33,5 +33,8 @@ class FileStore(cumulus.store.Store):
         os.unlink(k)
 
     def stat(self, type, name):
-        stat = os.stat(self._get_path(type, name))
-        return {'size': stat.st_size}
+        try:
+            stat = os.stat(self._get_path(type, name))
+            return {'size': stat.st_size}
+        except OSError:
+            raise cumulus.store.NotFoundError