projects
/
nmutil.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f61e3be
)
update docstring on add_prefix_to_record_signals
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Thu, 25 Jun 2020 09:31:35 +0000
(10:31 +0100)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Thu, 25 Jun 2020 09:31:35 +0000
(10:31 +0100)
src/nmutil/iocontrol.py
patch
|
blob
|
history
diff --git
a/src/nmutil/iocontrol.py
b/src/nmutil/iocontrol.py
index 2bd78965b063c42d30fcf6fbf20af98bd49c1f11..20bb8d6853654157f667d4b12c10e50acd4b7636 100644
(file)
--- a/
src/nmutil/iocontrol.py
+++ b/
src/nmutil/iocontrol.py
@@
-74,12
+74,15
@@
class Object:
def add_prefix_to_record_signals(prefix, record):
+ """recursively hunt through Records, modifying names to add a prefix
+ """
for key, val in record.fields.items():
if isinstance(val, Signal):
val.name = prefix + val.name
elif isinstance(val, Record):
add_prefix_to_record_signals(prefix, val)
+
class RecordObject(Record):
def __init__(self, layout=None, name=None):
Record.__init__(self, layout=layout or [], name=name)