aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mastodon/Mastodon.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 9e6d3ce..c4e50f3 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -1084,12 +1084,13 @@ class Mastodon:
1084 """ 1084 """
1085 Converts json string IDs to native python bignums. 1085 Converts json string IDs to native python bignums.
1086 """ 1086 """
1087 if ('id' in json_object and 1087 for key in ('id', 'in_reply_to_id', 'in_reply_to_account_id'):
1088 isinstance(json_object['id'], six.text_type)): 1088 if (key in json_object and
1089 try: 1089 isinstance(json_object[key], six.text_type)):
1090 json_object['id'] = int(json_object['id']) 1090 try:
1091 except ValueError: 1091 json_object[key] = int(json_object[key])
1092 pass 1092 except ValueError:
1093 pass
1093 1094
1094 return json_object 1095 return json_object
1095 1096
Powered by cgit v1.2.3 (git 2.41.0)