Lazily read the contents of ShaFiles from disk.
[jelmer/dulwich-libgit2.git] / dulwich / object_store.py
index 6456f6b3181051dfb05ca51342a8f3b78cc2089b..6eaa179b639c0d4aaf2cd59a2e28555c7f850498 100644 (file)
@@ -378,7 +378,7 @@ class DiskObjectStore(PackBasedObjectStore):
         path = self._get_shafile_path(sha)
         try:
             return ShaFile.from_file(path)
-        except OSError, e:
+        except (OSError, IOError), e:
             if e.errno == errno.ENOENT:
                 return None
             raise