From e6cae6e7b922f45e380bdb067bf510e4eba1be49 Mon Sep 17 00:00:00 2001 From: Demetrio92 Date: Thu, 17 Oct 2019 14:06:53 +0200 Subject: [PATCH] minor bugfix should be OR, not AN; color is spelled without U everywhere else; exception call itself was breaking --- src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py b/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py index bba90da5bc..2b78455868 100644 --- a/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py +++ b/src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py @@ -121,8 +121,8 @@ def display_shape(shape, clr=None, viewer_handle=None): raise Exception("No color named '%s'" % clr.upper()) elif isinstance(clr, Iterable): clr = tuple(clr) - if len(clr) < 3 and len(clr) > 4: - raise Exception("Need 3 or 4 colour components. Got '%r'." % clr) + if len(clr) < 3 or len(clr) > 4: + raise Exception("Need 3 or 4 color components. Got '%r'." % len(clr)) qclr = OCC.Quantity.Quantity_Color(clr[0], clr[1], clr[2], OCC.Quantity.Quantity_TOC_RGB) elif isinstance(clr, OCC.Quantity.Quantity_Color): qclr = clr