mirror of
https://github.com/searxng/searxng.git
synced 2024-11-26 04:41:00 +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
1 changed files with 5 additions and 1 deletions
|
@ -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 a new issue