From 3638e1777774eab21690fc2147dbd1ffe19d4197 Mon Sep 17 00:00:00 2001 From: Jan Petykiewicz Date: Wed, 21 Jun 2023 19:43:39 -0700 Subject: [PATCH] improve messaging when no nets/opens/shorts are detected --- snarled/trace.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/snarled/trace.py b/snarled/trace.py index ecd9017..79d40b5 100644 --- a/snarled/trace.py +++ b/snarled/trace.py @@ -68,16 +68,22 @@ class TraceAnalysis: ss += '\n(groups of electrically connected labels)\n' for net in sort_nets(self.nets): ss += '\t' + format_net(net) + '\n' + if not self.nets: + ss += '\t' ss += '\nOpens' ss += '\n(2+ nets containing the same name)\n' for label, count in sorted(self.opens.items()): ss += f'\t{label} : {count} nets\n' + if not self.opens: + ss += '\t' ss += '\nShorts' ss += '\n(2+ unique names for the same net)\n' for net in sort_nets(self.shorts): ss += '\t' + format_net(net) + '\n' + if not self.shorts: + ss += '\t' ss += '=============\n' return ss