From ea7d611819dfcac42ded713e10f3c703f5d2b455 Mon Sep 17 00:00:00 2001 From: Ivan Usov Date: Wed, 10 Feb 2021 13:20:22 +0100 Subject: [PATCH] Handle older files that don't contain "zebra_mode" --- pyzebra/ccl_io.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyzebra/ccl_io.py b/pyzebra/ccl_io.py index fa32338..450be76 100644 --- a/pyzebra/ccl_io.py +++ b/pyzebra/ccl_io.py @@ -126,6 +126,10 @@ def parse_1D(fileobj, data_type): # this is the end of metadata and the start of data section break + # handle older files that don't contain "zebra_mode" metadata + if "zebra_mode" not in metadata: + metadata["zebra_mode"] = "nb" + # read data scan = [] if data_type == ".ccl":