Skip to content

Commit b9d458e

Browse files
committed
Fix AttributeError on Python 3
1 parent 1e6361d commit b9d458e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎telebot/types.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
"""
2222

2323
import json
24+
import six
2425

2526

2627
class JsonSerializable:
@@ -70,7 +71,7 @@ def check_json(json_type):
7071

7172
def __str__(self):
7273
d = {}
73-
for x, y in self.__dict__.iteritems():
74+
for x, y in six.iteritems(self.__dict__):
7475
if hasattr(y, '__dict__'):
7576
d[x] = y.__dict__
7677
else:

0 commit comments

Comments
 (0)