mirror of
https://github.com/searxng/searxng
synced 2024-01-01 18:24:07 +00:00
Merge pull request #27 from return42/fix-debug-log
[fix] debug log: UnicodeEncodeError: 'ascii' codec can't encode
This commit is contained in:
commit
12bdf7146b
@ -54,6 +54,7 @@ from datetime import datetime, timedelta
|
||||
from timeit import default_timer
|
||||
from html import escape
|
||||
from io import StringIO
|
||||
import urllib
|
||||
from urllib.parse import urlencode, urlparse
|
||||
|
||||
from pygments import highlight
|
||||
@ -246,7 +247,10 @@ def get_locale():
|
||||
request.form['use-translation'] = 'oc'
|
||||
locale = 'fr_FR'
|
||||
|
||||
logger.debug("%s uses locale `%s` from %s", request.url, locale, locale_source)
|
||||
logger.debug(
|
||||
"%s uses locale `%s` from %s", urllib.parse.quote(request.url), locale, locale_source
|
||||
)
|
||||
|
||||
return locale
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user