# HG changeset patch # User Paul Boddie # Date 1473350827 -7200 # Node ID 22b071aeca2fbb6845597760d1699185a9aef2cc # Parent 077db54bcdc19c320f047b592c4cde9146c89e02 Added commentary about finding additional required modules. diff -r 077db54bcdc1 -r 22b071aeca2f importer.py --- a/importer.py Thu Sep 08 14:03:19 2016 +0200 +++ b/importer.py Thu Sep 08 18:07:07 2016 +0200 @@ -372,10 +372,19 @@ else: self.required.add(provider) + # Check modules again to see if they are now required and should now + # cause the inclusion of other modules providing objects to the program. + for module_name in self.waiting.keys(): self.require_providers(module_name) def require_providers(self, module_name): + + """ + Test if 'module_name' is itself required and, if so, require modules + containing objects provided to the module. + """ + if module_name in self.required and self.waiting.has_key(module_name): for provider in self.waiting[module_name]: if provider not in self.required: