_plugincontext.py: Fix unhandled exception if plugin is not found
This fixes an AttributeError triggered if we try to import a plugin from
a package which is installed but does not contain that plugin.
Before:
[--:--:--] START Resolving pipeline
Traceback (most recent call last):
...
AttributeError: 'NoneType' object has no attribute 'dist'
After:
[--:--:--] START Resolving pipeline
[00:00:00] FAILURE Resolving pipeline
Error loading pipeline: Pip package buildstream-external does not contain a plugin named 'nonexistant-plugin'
Loading
Please register or sign in to comment