Bug 562289 – Race when removing invalid cache
authorJohan Dahlin <jdahlin@async.com.br>
Sun, 30 Nov 2008 13:05:52 +0000 (13:05 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Sun, 30 Nov 2008 13:05:52 +0000 (13:05 +0000)
2008-11-30  Johan Dahlin  <jdahlin@async.com.br>

        Bug 562289 – Race when removing invalid cache

        * giscanner/cachestore.py:
        ENOENT is mapped to a OSError, not IOError.

svn path=/trunk/; revision=979

ChangeLog
giscanner/cachestore.py

index ca82d60..d44a0fb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-11-30  Johan Dahlin  <jdahlin@async.com.br>
+
+       Bug 562289 – Race when removing invalid cache
+
+       * giscanner/cachestore.py:
+       ENOENT is mapped to a OSError, not IOError.
+
 2008-11-27  Johan Dahlin  <jdahlin@async.com.br>
 
        * gir/glib-2.0.c: Add return value transfer annotation
index bd3d864..d7d7b4f 100644 (file)
@@ -68,8 +68,11 @@ class CacheStore(object):
             # Permission denied
             if e.errno == errno.EACCES:
                 return
+            else:
+                raise
+       except OSError, e:
             # File does not exist
-            elif e.errno == errno.ENOENT:
+            if e.errno == errno.ENOENT:
                 return
             else:
                 raise