diff options
| author | Markus Heiser <markus.heiser@darmarIT.de> | 2021-06-17 13:38:50 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-17 13:38:50 +0000 |
| commit | 7ef33c91e057defde55cc90d4123f284910723d9 (patch) | |
| tree | 067ee53dba0755d0783436597d5c9d3d8200f841 /searx/plugins/__init__.py | |
| parent | 92c68fe636ede2b10a2b4d71c559a22969b38f6f (diff) | |
| parent | 881659ca9d29dbce5b19c5a69f03b2d1022d3615 (diff) | |
Merge pull request #136 from searxng/issue-115
/preferences: use simple layout for the oscar theme (Issue 115)
Diffstat (limited to 'searx/plugins/__init__.py')
| -rw-r--r-- | searx/plugins/__init__.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/searx/plugins/__init__.py b/searx/plugins/__init__.py index 22f475875..45b210662 100644 --- a/searx/plugins/__init__.py +++ b/searx/plugins/__init__.py @@ -70,6 +70,13 @@ class PluginStore(): if not hasattr(plugin, plugin_attr) or not isinstance(getattr(plugin, plugin_attr), plugin_attr_type): setattr(plugin, plugin_attr, plugin_attr_type()) plugin.id = plugin.name.replace(' ', '_') + if not hasattr(plugin, 'preference_section'): + plugin.preference_section = 'general' + if plugin.preference_section == 'query': + for plugin_attr in ('query_keywords', 'query_examples'): + if not hasattr(plugin, plugin_attr): + logger.critical('missing attribute "{0}", cannot load plugin: {1}'.format(plugin_attr, plugin)) + exit(3) self.plugins.append(plugin) def call(self, ordered_plugin_list, plugin_type, request, *args, **kwargs): |