Ver código fonte

[fix] hash plugin

Venca24 7 anos atrás
pai
commit
dee04b2a21
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2
    1
      searx/plugins/hash_plugin.py

+ 2
- 1
searx/plugins/hash_plugin.py Ver arquivo

36
         # wrong query
36
         # wrong query
37
         return True
37
         return True
38
 
38
 
39
-    # end if the string is empty
40
     function, string = m.groups()
39
     function, string = m.groups()
40
+    function = str(function.decode('UTF-8'))  # convert to string for python3
41
     if string.strip().__len__() == 0:
41
     if string.strip().__len__() == 0:
42
+        # end if the string is empty
42
         return True
43
         return True
43
 
44
 
44
     # select hash function
45
     # select hash function