Failing to load a crawler state pickle uses default values, but the exception clause to detect this failure is too narrow; it can also fail with EOFError or KeyError for example.

This commit is contained in:
david-sarah 2012-07-02 18:18:47 +00:00
parent d278b1220f
commit 3cb99364e6

View File

@ -194,7 +194,7 @@ class ShareCrawler(service.MultiService):
f = open(self.statefile, "rb")
state = pickle.load(f)
f.close()
except EnvironmentError:
except Exception:
state = {"version": 1,
"last-cycle-finished": None,
"current-cycle": None,