diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/plugins/manager.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/flake8/plugins/manager.py b/src/flake8/plugins/manager.py index 844a787..28f38a6 100644 --- a/src/flake8/plugins/manager.py +++ b/src/flake8/plugins/manager.py @@ -139,6 +139,12 @@ class Plugin(object): self._plugin = self.entry_point.load( require=verify_requirements ) + if not callable(self._plugin): + msg = ('Plugin %r is not a callable. It might be written for an' + ' older version of flake8 and might not work with this' + ' version' % self._plugin) + LOG.critical(msg) + raise TypeError(msg) def load_plugin(self, verify_requirements=False): """Retrieve the plugin for this entry-point. |
