Commit 91afe3b3 authored by Jason R. Coombs's avatar Jason R. Coombs

Avoid errors when metadata directory is broken. Ref #419.

parent 434d573a
...@@ -9,6 +9,8 @@ CHANGES ...@@ -9,6 +9,8 @@ CHANGES
* Issue #471: Don't rely on repr for an HTML attribute value in * Issue #471: Don't rely on repr for an HTML attribute value in
package_index. package_index.
* Issue #419: Avoid errors in FileMetadata when the metadata directory
is broken.
------ ------
18.7.1 18.7.1
......
...@@ -2017,7 +2017,7 @@ class FileMetadata(EmptyProvider): ...@@ -2017,7 +2017,7 @@ class FileMetadata(EmptyProvider):
self.path = path self.path = path
def has_metadata(self, name): def has_metadata(self, name):
return name=='PKG-INFO' return name=='PKG-INFO' and os.path.isfile(self.path)
def get_metadata(self, name): def get_metadata(self, name):
if name=='PKG-INFO': if name=='PKG-INFO':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment