Skip to content

Commit f09c866

Browse files
authored
Merge pull request #28 from jkyeung/patch-1
Allow iPgm.addParm to pass options to iParm
2 parents ce091bb + 9aa0cae commit f09c866

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/itoolkit/itoolkit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,17 +384,18 @@ def __init__(self, ikey, iname, iopt={}):
384384
super(iPgm, self).__init__(iopt, opts)
385385
self.pcnt = 0
386386

387-
def addParm(self, obj): # noqa N802
387+
def addParm(self, obj, iopt={}): # noqa N802
388388
"""Add a parameter child node.
389389
390390
Args:
391391
obj (obj): iData object or iDs object.
392+
iopt (dict): options to pass to iParm constructor
392393
393394
Returns:
394395
(void)
395396
"""
396397
self.pcnt += 1
397-
p = iParm('p' + str(self.pcnt))
398+
p = iParm('p' + str(self.pcnt), iopt)
398399
p.add(obj)
399400
self.add(p)
400401
return self

0 commit comments

Comments
 (0)