Skip to content

Commit 521fbe5

Browse files
authored
CSES: Keep old results around until new results are fetched (cheran-senthil#268)
1 parent d30093e commit 521fbe5

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

tle/cogs/cses.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ async def _cache_data(self):
3030

3131
async def _reload(self):
3232
self.reloading = True
33-
self.short_placings = {}
34-
self.fast_placings = {}
35-
3633
short_placings = defaultdict(list)
3734
fast_placings = defaultdict(list)
3835
try:
@@ -42,12 +39,10 @@ async def _reload(self):
4239
fast_placings[fast[i]].append(i + 1)
4340
for i in range(len(short)):
4441
short_placings[short[i]].append(i + 1)
45-
except cses.CSESError:
46-
pass # TODO log here?
47-
finally:
48-
self.reloading = False
4942
self.short_placings = short_placings
5043
self.fast_placings = fast_placings
44+
finally:
45+
self.reloading = False
5146

5247
def format_leaderboard(self, top, placings):
5348
if not top:

0 commit comments

Comments
 (0)