Fix for cache-based crash on second mdata when caching is wonky.
This commit is contained in:
parent
776ed8cc78
commit
253dd52b67
@ -176,8 +176,11 @@ class JubeatBase(CoreHandler, CardManagerHandler, PASELIHandler, Base):
|
||||
scores = self.data.remote.music.get_scores(self.game, self.music_version, userid)
|
||||
else:
|
||||
# We will want to fetch the remaining scores that were in our
|
||||
# cache.
|
||||
scores = self.cache.get(cache_key)
|
||||
# cache. If the cache is empty, due to some error, or because
|
||||
# we cached nothing below, then we will end up returning an
|
||||
# empty list. This shouldn't happen, but guard against crashing
|
||||
# if this returns None anyway.
|
||||
scores = self.cache.get(cache_key) or []
|
||||
|
||||
if len(scores) < 50:
|
||||
# We simply return the whole amount for this, and cache nothing.
|
||||
|
Loading…
Reference in New Issue
Block a user