Lichen

Change of importer.py

411:a980ec14c2ce
importer.py
     1.1 --- a/importer.py	Thu Dec 15 16:09:01 2016 +0100
     1.2 +++ b/importer.py	Thu Dec 15 17:06:36 2016 +0100
     1.3 @@ -456,8 +456,7 @@
     1.4                          # Record a module ordering dependency.
     1.5  
     1.6                          if not found.static() or self.uses_dynamic_callable(found):
     1.7 -                            init_item(self.depends, module.name, set)
     1.8 -                            self.depends[module.name].add(provider)
     1.9 +                            self.add_provider(module.name, provider)
    1.10  
    1.11              module.deferred = original_deferred
    1.12  
    1.13 @@ -467,6 +466,13 @@
    1.14          for module_name in self.waiting.keys():
    1.15              self.require_providers(module_name)
    1.16  
    1.17 +    def add_provider(self, module_name, provider):
    1.18 +
    1.19 +        "Add a dependency for 'module_name' of 'provider'."
    1.20 +
    1.21 +        init_item(self.depends, module_name, set)
    1.22 +        self.depends[module_name].add(provider)
    1.23 +
    1.24      def require_providers(self, module_name):
    1.25  
    1.26          """