From 069c332a6815c6c67b77a7af328e7bb2993d175d Mon Sep 17 00:00:00 2001 From: meejah Date: Mon, 25 Oct 2021 21:49:25 -0600 Subject: [PATCH] straight assert --- src/allmydata/storage/crawler.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/allmydata/storage/crawler.py b/src/allmydata/storage/crawler.py index 2e9bafd13..d1366765e 100644 --- a/src/allmydata/storage/crawler.py +++ b/src/allmydata/storage/crawler.py @@ -86,10 +86,7 @@ def _convert_pickle_state_to_json(state): # ["cycle-to-date"]["leases-per-share-histogram"] gets str keys instead of int # ["cycle-start-finish-times"] from 2-tuple to list # ["history"] keys are strings - if state["version"] != 1: - raise ValueError( - "Unknown version {version} in pickle state".format(**state) - ) + assert state["version"] == 1, "Only known version is 1" converters = { "cycle-to-date": _convert_cycle_data,