From 7d7a9a45c11ef7af7079b472334c6905c27e765b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 7 Feb 2020 14:18:21 +0000 Subject: [PATCH] use assert not raise ValueError --- src/ieee754/part_cmp/eq_gt_ge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ieee754/part_cmp/eq_gt_ge.py b/src/ieee754/part_cmp/eq_gt_ge.py index c6f15b36..70a202c3 100644 --- a/src/ieee754/part_cmp/eq_gt_ge.py +++ b/src/ieee754/part_cmp/eq_gt_ge.py @@ -44,8 +44,8 @@ class PartitionedEqGtGe(Elaboratable): self.partition_points = PartitionPoints(partition_points) self.mwidth = len(self.partition_points)+1 self.output = Signal(self.mwidth, reset_less=True) - if not self.partition_points.fits_in_width(width): - raise ValueError("partition_points doesn't fit in width") + assert self.partition_points.fits_in_width(width), + "partition_points doesn't fit in width" def elaborate(self, platform): m = Module() -- 2.30.2