[mod] searx uses flask framework only in webapp.py. Make migration to another framework easier.

This commit is contained in:
Alexandre Flament 2017-01-02 12:06:04 +01:00
parent 3d8c9bab96
commit 84a2c97a65
4 changed files with 21 additions and 24 deletions

View file

@ -63,9 +63,9 @@ class PluginStore():
plugin.id = plugin.name.replace(' ', '_')
self.plugins.append(plugin)
def call(self, plugin_type, request, *args, **kwargs):
def call(self, ordered_plugin_list, plugin_type, request, *args, **kwargs):
ret = True
for plugin in request.user_plugins:
for plugin in ordered_plugin_list:
if hasattr(plugin, plugin_type):
ret = getattr(plugin, plugin_type)(request, *args, **kwargs)
if not ret: