mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Fix AttributeError on Python 3
This commit is contained in:
parent
1e6361dd57
commit
b9d458e643
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user