mirror of
https://github.com/searxng/searxng.git
synced 2024-08-20 13:21:35 +02: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 timeit import default_timer
|
||||||
from html import escape
|
from html import escape
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
|
import urllib
|
||||||
from urllib.parse import urlencode, urlparse
|
from urllib.parse import urlencode, urlparse
|
||||||
|
|
||||||
from pygments import highlight
|
from pygments import highlight
|
||||||
@ -246,7 +247,10 @@ def get_locale():
|
|||||||
request.form['use-translation'] = 'oc'
|
request.form['use-translation'] = 'oc'
|
||||||
locale = 'fr_FR'
|
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
|
return locale
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user