From: david-sarah Date: Mon, 2 Jul 2012 18:18:47 +0000 (+0000) Subject: Failing to load a crawler state pickle uses default values, but the exception clause... X-Git-Tag: allmydata-tahoe-1.10a1~71 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/COPYING.TGPPL.html?a=commitdiff_plain;h=3cb99364e6a83d0064d2838a0c470278903e19ac;p=tahoe-lafs%2Ftahoe-lafs.git 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. --- diff --git a/src/allmydata/storage/crawler.py b/src/allmydata/storage/crawler.py index 3a917b8d..438dd5e3 100644 --- a/src/allmydata/storage/crawler.py +++ b/src/allmydata/storage/crawler.py @@ -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,