From 21a916d953c258fcfba0c52d6ef87c5a141b531f Mon Sep 17 00:00:00 2001 From: Vladimir Iakovlev Date: Tue, 10 Oct 2017 19:19:54 +0200 Subject: [PATCH] #708: Fix handling of shelve errors --- thefuck/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thefuck/utils.py b/thefuck/utils.py index ad136769..fa755bf6 100644 --- a/thefuck/utils.py +++ b/thefuck/utils.py @@ -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)