Explorar o código

Handle probes that hit directories.

Jelmer Vernooij %!s(int64=7) %!d(string=hai) anos
pai
achega
3960c009f2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      dulwich/refs.py

+ 1 - 1
dulwich/refs.py

@@ -564,7 +564,7 @@ class DiskRefsContainer(RefsContainer):
                     # Read only the first 40 bytes
                     return header + f.read(40 - len(SYMREF))
         except IOError as e:
-            if e.errno == errno.ENOENT:
+            if e.errno in (errno.ENOENT, errno.EISDIR):
                 return None
             raise