Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit d2f321e

Browse files
committed
Json dump the data
1 parent fcf4b29 commit d2f321e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

shared/torngit/github.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import hashlib
33
import logging
44
import os
5+
import json
56
from base64 import b64decode
67
from typing import List
78

@@ -677,7 +678,7 @@ async def get_commit_statuses(self, commit, token=None):
677678
loggable_token=self.loggable_token(token)
678679
),
679680
)
680-
return Status(statuses)
681+
return Status(json.loads(statuses))
681682
statuses = []
682683
async with self.get_client() as client:
683684
while True:
@@ -710,7 +711,7 @@ async def get_commit_statuses(self, commit, token=None):
710711
redis_service = self.get_redis_service()
711712
redis_service.set(
712713
cache_key,
713-
statuses,
714+
json.dumps(statuses),
714715
self._status_cache_duration,
715716
)
716717
return Status(statuses)
@@ -779,7 +780,7 @@ async def get_compare(
779780
loggable_token=self.loggable_token(token)
780781
),
781782
)
782-
return result
783+
return json.loads(result)
783784
async with self.get_client() as client:
784785
res = await self.api(
785786
client,
@@ -838,7 +839,7 @@ async def get_compare(
838839
redis_service = self.get_redis_service()
839840
redis_service.set(
840841
cache_key,
841-
result,
842+
json.dumps(result),
842843
self._compare_cache_duration,
843844
)
844845
return result

0 commit comments

Comments
 (0)