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)
|
scores = self.data.remote.music.get_scores(self.game, self.music_version, userid)
|
||||||
else:
|
else:
|
||||||
# We will want to fetch the remaining scores that were in our
|
# We will want to fetch the remaining scores that were in our
|
||||||
# cache.
|
# cache. If the cache is empty, due to some error, or because
|
||||||
scores = self.cache.get(cache_key)
|
# 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:
|
if len(scores) < 50:
|
||||||
# We simply return the whole amount for this, and cache nothing.
|
# We simply return the whole amount for this, and cache nothing.
|
||||||
|
Loading…
Reference in New Issue
Block a user