1
0
mirror of https://github.com/nvbn/thefuck.git synced 2024-10-05 18:31:10 +01:00

#708: Fix handling of shelve errors

This commit is contained in:
Vladimir Iakovlev 2017-10-10 19:19:54 +02:00
parent d228091beb
commit 21a916d953

View File

@ -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)