From: Zac Medico Date: Wed, 4 Aug 2010 07:50:25 +0000 (-0700) Subject: Add a sanity check in _preload_portage_submodules() to ensure that the X-Git-Tag: v2.2_rc68~413 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=23ee701db27b21ff7c21df88430137c68ea38fa4;p=portage.git Add a sanity check in _preload_portage_submodules() to ensure that the loop always terminates. --- diff --git a/pym/portage/proxy/lazyimport.py b/pym/portage/proxy/lazyimport.py index b5a2385d3..b5d15931b 100644 --- a/pym/portage/proxy/lazyimport.py +++ b/pym/portage/proxy/lazyimport.py @@ -28,10 +28,14 @@ def _preload_portage_submodules(): so some portage submodules may still remain unimported after this function is called. """ + imported = set() while True: remaining = False for name in list(_module_proxies): if name.startswith('portage.'): + if name in imported: + continue + imported.add(name) remaining = True __import__(name) _unregister_module_proxy(name)