bpo-33254: do not return an empty list when asking for the contents of a namespace package (GH-6467)

This commit is contained in:
Brett Cannon 2018-04-30 11:31:45 -07:00 committed by GitHub
parent 10f715d712
commit 3ab9365dca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 21 deletions

View file

@ -381,8 +381,8 @@ class ResourceReader(metaclass=abc.ABCMeta):
@abc.abstractmethod
def contents(self):
"""Return an iterator of strings over the contents of the package."""
return iter([])
"""Return an iterable of strings over the contents of the package."""
return []
_register(ResourceReader, machinery.SourceFileLoader)