readd deprecated plugins search with name == b'name'

This is to make sure we can still load plugins based off official
plugins between the time of 9c41c39913 and 71b9fd785c
This commit is contained in:
Johnny Robeson 2016-05-30 01:03:18 -04:00
parent 71b9fd785c
commit a5921f625c

View file

@ -538,7 +538,8 @@ def _package_path(name):
``name == "__main__"``).
"""
loader = pkgutil.get_loader(name)
if loader is None or name == '__main__':
# name == b'main' is deprecated
if loader is None or name == '__main__' or name == b'main':
return None
if hasattr(loader, 'get_filename'):