on master help sign in
Change self plugin to self_info + change self_info description
0fe362bLuc Didry
searx/plugins/__init__.py+2−2
@@ -20,7 +20,7 @@ from searx import logger
20logger = logger.getChild('plugins')
20logger = logger.getChild('plugins')
21
21
22from searx.plugins import (https_rewrite,
22from searx.plugins import (https_rewrite,
23− self,
23+ self_info,
24 search_on_category_select)
24 search_on_category_select)
25
25
26required_attrs = (('name', str),
26required_attrs = (('name', str),
@@ -71,5 +71,5 @@ class PluginStore():
71
71
72plugins = PluginStore()
72plugins = PluginStore()
73plugins.register(https_rewrite)
73plugins.register(https_rewrite)
74−plugins.register(self)
74+plugins.register(self_info)
75plugins.register(search_on_category_select)
75plugins.register(search_on_category_select)
searx/plugins/self.py → searx/plugins/self_info.pyrenamed+1−1
@@ -17,7 +17,7 @@ along with searx. If not, see < http://www.gnu.org/licenses/ >.
17from flask.ext.babel import gettext
17from flask.ext.babel import gettext
18import re
18import re
19name = "Self Informations"
19name = "Self Informations"
20−description = gettext('Correct Duckduckgo instant answers with your own informations (IP and User Agent)')
20+description = gettext('Displays your IP if the query is "ip" and your user agent if the query contains "user agent".')
21default_on = True
21default_on = True
22
22
23
23
searx/tests/test_plugins.py+1−1
@@ -38,7 +38,7 @@ class SelfIPTest(SearxTestCase):
38
38
39 def test_PluginStore_init(self):
39 def test_PluginStore_init(self):
40 store = plugins.PluginStore()
40 store = plugins.PluginStore()
41− store.register(plugins.self)
41+ store.register(plugins.self_info)
42
42
43 self.assertTrue(len(store.plugins) == 1)
43 self.assertTrue(len(store.plugins) == 1)
44
44