From 3971ec273be0662dd16fea276dfeabcc9e262119 Mon Sep 17 00:00:00 2001 From: Michael Nolan Date: Tue, 5 May 2020 09:09:49 -0400 Subject: [PATCH] Revert "Flatten the output of RecordObject.ports()" This reverts commit c2da46e377fbf04488622dbf33aa240988b1dd9e. --- src/nmutil/iocontrol.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/nmutil/iocontrol.py b/src/nmutil/iocontrol.py index e403da7..853a1d0 100644 --- a/src/nmutil/iocontrol.py +++ b/src/nmutil/iocontrol.py @@ -103,15 +103,7 @@ class RecordObject(Record): yield x def ports(self): # would be better being called "keys" - results = [] - # If the record itself contains records, flatten them - for item in list(self): - ports_fun = getattr(item, "ports", None) - if callable(ports_fun): - results.extend(ports_fun()) - else: - results.append(item) - return results + return list(self) class PrevControl(Elaboratable): -- 2.30.2