mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
fix issue #403: UnicodeEncodeError when sending a non-ASCII file in Python 2.7
This commit is contained in:
parent
28111bdf4e
commit
5dd88f8223
@ -953,7 +953,7 @@ def _convert_input_media(array):
|
|||||||
def _no_encode(func):
|
def _no_encode(func):
|
||||||
def wrapper(key, val):
|
def wrapper(key, val):
|
||||||
if key == 'filename':
|
if key == 'filename':
|
||||||
return '{0}={1}'.format(key, val)
|
return u'{0}={1}'.format(key, val)
|
||||||
else:
|
else:
|
||||||
return func(key, val)
|
return func(key, val)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user