From 28cdb34b08991d240d3f4aee8e4858839c5cd68d Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Sat, 21 Jul 2018 13:49:11 -0700 Subject: [PATCH] ctrapezoid_type may be None (modal) --- fatamorgana/records.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fatamorgana/records.py b/fatamorgana/records.py index 87a9290..6369ff8 100644 --- a/fatamorgana/records.py +++ b/fatamorgana/records.py @@ -2116,7 +2116,7 @@ class CTrapezoid(Record): if ctrapezoid_type in range(12, 16) and 2 * width > height: raise InvalidDataError('CTrapezoid has 2*width > height' ' ({} > 2 * {})'.format(width, height)) - if ctrapezoid_type not in range(0, 26): + if ctrapezoid_type is not None and ctrapezoid_type not in range(0, 26): raise InvalidDataError('CTrapezoid has invalid type: ' '{}'.format(ctrapezoid_type))