mirror of
https://github.com/Thor77/TeamspeakStats.git
synced 2025-07-07 07:58:43 -04:00
Catch UnpicklingError in Cache.read
This commit is contained in:
parent
c6a8bea31e
commit
c32ed0360f
1 changed files with 1 additions and 1 deletions
|
@ -58,7 +58,7 @@ class Cache(MutableMapping):
|
||||||
with open(path, 'rb') as f:
|
with open(path, 'rb') as f:
|
||||||
try:
|
try:
|
||||||
data = pickle.load(f)
|
data = pickle.load(f)
|
||||||
except EOFError:
|
except EOFError or pickle.UnpicklingError:
|
||||||
logger.debug('Couldn\'t read cache')
|
logger.debug('Couldn\'t read cache')
|
||||||
return cls(path, data)
|
return cls(path, data)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue