mirror of
https://github.com/nvbn/thefuck.git
synced 2025-01-18 20:11:17 +00:00
#708: Fix handling of shelve errors
This commit is contained in:
parent
d228091beb
commit
21a916d953
@ -195,7 +195,7 @@ class Cache(object):
|
||||
|
||||
try:
|
||||
self._db = shelve.open(cache_path)
|
||||
except (shelve_open_error, ImportError):
|
||||
except shelve_open_error + (ImportError,):
|
||||
# Caused when switching between Python versions
|
||||
warn("Removing possibly out-dated cache")
|
||||
os.remove(cache_path)
|
||||
|
Loading…
x
Reference in New Issue
Block a user