comparison libervia/server/utils.py @ 1224:62bf4f87c249

server: some encoding fixes following python 3 port
author Goffi <goffi@goffi.org>
date Sun, 06 Oct 2019 22:21:13 +0200
parents b2d067339de3
children 987595a254b0
comparison
equal deleted inserted replaced
1223:4976eb0f5315 1224:62bf4f87c249
26 log = getLogger(__name__) 26 log = getLogger(__name__)
27 27
28 28
29 def quote(value, safe="@"): 29 def quote(value, safe="@"):
30 """shortcut to quote an unicode value for URL""" 30 """shortcut to quote an unicode value for URL"""
31 return urllib.parse.quote(value.encode("utf-8"), safe=safe) 31 return urllib.parse.quote(value, safe=safe)
32 32
33 33
34 class ProgressHandler(object): 34 class ProgressHandler(object):
35 """class to help the management of progressions""" 35 """class to help the management of progressions"""
36 36