Skip to content

Commit 303e15b

Browse files
committed
Merge pull request eternnoir#84 from AndydeCleyre/patch-1
Fix AttributeError on Python 3
2 parents 1e6361d + b9d458e commit 303e15b

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)