1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Merge pull request #84 from AndydeCleyre/patch-1

Fix AttributeError on Python 3
This commit is contained in:
FrankWang 2015-10-09 21:57:05 +08:00
commit 303e15b88d

View File

@ -21,6 +21,7 @@ ForceReply
"""
import json
import six
class JsonSerializable:
@ -70,7 +71,7 @@ class JsonDeserializable:
def __str__(self):
d = {}
for x, y in self.__dict__.iteritems():
for x, y in six.iteritems(self.__dict__):
if hasattr(y, '__dict__'):
d[x] = y.__dict__
else: