Commit 397d759e authored by Jason R. Coombs's avatar Jason R. Coombs

Pull up DefaultProvider registration into a classmethod.

parent e01792ec
......@@ -1725,10 +1725,14 @@ class DefaultProvider(EggProvider):
with open(path, 'rb') as stream:
return stream.read()
register_loader_type(type(None), DefaultProvider)
@classmethod
def _register(cls):
register_loader_type(type(None), cls)
if importlib_machinery is not None:
register_loader_type(importlib_machinery.SourceFileLoader, DefaultProvider)
if importlib_machinery is not None:
register_loader_type(importlib_machinery.SourceFileLoader, cls)
DefaultProvider._register()
class EmptyProvider(NullProvider):
......
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