diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-11-13 21:55:54 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-11-13 21:55:54 +0900 |
commit | 4be7facd7f7a13a81fe5f66dc071c9a0c543698e (patch) | |
tree | bbe3fc4fb6e66de99a2d0041fc948e2786ad7597 /buildstream/_plugincontext.py | |
parent | 5c9e13d2d6560dea0b81ea4ebbdabc2972191819 (diff) | |
download | buildstream-4be7facd7f7a13a81fe5f66dc071c9a0c543698e.tar.gz |
_plugincontext.py: Raise PluginError when plugin setup is not a function
Diffstat (limited to 'buildstream/_plugincontext.py')
-rw-r--r-- | buildstream/_plugincontext.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/buildstream/_plugincontext.py b/buildstream/_plugincontext.py index a108c28ac..2132a9e08 100644 --- a/buildstream/_plugincontext.py +++ b/buildstream/_plugincontext.py @@ -81,7 +81,10 @@ class _PluginContext(): try: plugin_type = plugin.setup() except AttributeError as e: - raise PluginError ("%s plugin '%s' did not provide a setup() method" % + raise PluginError ("%s plugin '%s' did not provide a setup() function" % + (self.base_type.__name__, kind)) from e + except TypeError as e: + raise PluginError ("setup symbol in %s plugin '%s' is not a function" % (self.base_type.__name__, kind)) from e self.assert_plugin (kind, plugin_type) |