Skip to content

Commit 99b14a0

Browse files
committed
Allow iPgm.addParm to pass options to iParm
This change is useful for allowing pass-by-value without having to import `iParm` directly. There may be other uses; whatever you can do with `iParm`, you ought to be able to do on the call to `addParm`. Signed-off-by: jkyeung <gallium.arsenide@gmail.com>
1 parent bae5a85 commit 99b14a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/itoolkit/itoolkit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ def __init__(self, ikey, iname, iopt={}):
386386
super(iPgm, self).__init__(iopt, opts)
387387
self.pcnt = 0
388388

389-
def addParm(self, obj): # noqa N802
389+
def addParm(self, obj, iopt={}): # noqa N802
390390
"""Add a parameter child node.
391391
392392
Args:
@@ -396,7 +396,7 @@ def addParm(self, obj): # noqa N802
396396
(void)
397397
"""
398398
self.pcnt += 1
399-
p = iParm('p' + str(self.pcnt))
399+
p = iParm('p' + str(self.pcnt), iopt)
400400
p.add(obj)
401401
self.add(p)
402402
return self

0 commit comments

Comments
 (0)