Skip to content

Commit e6cae6e

Browse files
Demetrio92aothms
authored andcommitted
minor bugfix
should be OR, not AN; color is spelled without U everywhere else; exception call itself was breaking
1 parent d917e73 commit e6cae6e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ifcopenshell-python/ifcopenshell/geom/occ_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ def display_shape(shape, clr=None, viewer_handle=None):
121121
raise Exception("No color named '%s'" % clr.upper())
122122
elif isinstance(clr, Iterable):
123123
clr = tuple(clr)
124-
if len(clr) < 3 and len(clr) > 4:
125-
raise Exception("Need 3 or 4 colour components. Got '%r'." % clr)
124+
if len(clr) < 3 or len(clr) > 4:
125+
raise Exception("Need 3 or 4 color components. Got '%r'." % len(clr))
126126
qclr = OCC.Quantity.Quantity_Color(clr[0], clr[1], clr[2], OCC.Quantity.Quantity_TOC_RGB)
127127
elif isinstance(clr, OCC.Quantity.Quantity_Color):
128128
qclr = clr

0 commit comments

Comments
 (0)