From: Michael Nolan Date: Tue, 5 May 2020 13:09:49 +0000 (-0400) Subject: Revert "Flatten the output of RecordObject.ports()" X-Git-Tag: 24jan2021_ls180~62 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3971ec273be0662dd16fea276dfeabcc9e262119;p=nmutil.git Revert "Flatten the output of RecordObject.ports()" This reverts commit c2da46e377fbf04488622dbf33aa240988b1dd9e. --- 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):