mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2024-12-31 18:27:00 +00:00
straight assert
This commit is contained in:
parent
94670461f1
commit
069c332a68
@ -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-to-date"]["leases-per-share-histogram"] gets str keys instead of int
|
||||||
# ["cycle-start-finish-times"] from 2-tuple to list
|
# ["cycle-start-finish-times"] from 2-tuple to list
|
||||||
# ["history"] keys are strings
|
# ["history"] keys are strings
|
||||||
if state["version"] != 1:
|
assert state["version"] == 1, "Only known version is 1"
|
||||||
raise ValueError(
|
|
||||||
"Unknown version {version} in pickle state".format(**state)
|
|
||||||
)
|
|
||||||
|
|
||||||
converters = {
|
converters = {
|
||||||
"cycle-to-date": _convert_cycle_data,
|
"cycle-to-date": _convert_cycle_data,
|
||||||
|
Loading…
Reference in New Issue
Block a user