Explorar el Código

fix little bug to allow webapp.py without client var

Thomas Pointhuber hace 11 años
padre
commit
71c6124f7b
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3
    3
      searx/webapp.py

+ 3
- 3
searx/webapp.py Ver fichero

122
     if not request.args and not request.form:
122
     if not request.args and not request.form:
123
         return render(
123
         return render(
124
             'index.html',
124
             'index.html',
125
-            client=settings['client']
125
+            client=settings.get('client', None)
126
         )
126
         )
127
 
127
 
128
     try:
128
     try:
130
     except:
130
     except:
131
         return render(
131
         return render(
132
             'index.html',
132
             'index.html',
133
-            client=settings['client']
133
+            client=settings.get('client', None)
134
         )
134
         )
135
 
135
 
136
     # TODO moar refactor - do_search integration into Search class
136
     # TODO moar refactor - do_search integration into Search class
212
     return render(
212
     return render(
213
         'results.html',
213
         'results.html',
214
         results=search.results,
214
         results=search.results,
215
-        client=settings['client'],
215
+        client=settings.get('client', None),
216
         q=search.request_data['q'],
216
         q=search.request_data['q'],
217
         selected_categories=search.categories,
217
         selected_categories=search.categories,
218
         paging=search.paging,
218
         paging=search.paging,