Fix a potential exception when earlier automagics don't succeed.

This commit is contained in:
Mike Auty
2017-11-04 18:54:52 +00:00
parent 585ec3f72d
commit fd582f62e2
+4 -3
View File
@@ -31,9 +31,10 @@ class LinuxSymbolFinder(interfaces.automagic.AutomagicInterface):
# Find the TranslationLayer sibling to the SymbolRequirement
if (isinstance(tl_requirement, interfaces.configuration.TranslationLayerRequirement) and
tl_path == path):
self._banner_scan(context, path, requirement, context.config[tl_sub_path],
progress_callback)
break
if context.config.get(tl_sub_path, None):
self._banner_scan(context, path, requirement, context.config[tl_sub_path],
progress_callback)
break
def _banner_scan(self, context, config_path, requirement, layer_name, progress_callback = None):
"""Accepts a context, config_path and SymbolRequirement, with a constructed layer_name