Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Juniper/py-junos-eznc
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Schulman committed Jan 30, 2014
2 parents 05f0298 + 5a29f9b commit 4dd5c4f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/jnpr/junos/rpcmeta.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,13 @@ def _exec_rpc(*vargs, **kvargs):
if kvargs:
for arg_name, arg_value in kvargs.items():
arg_name = re.sub('_','-',arg_name)
arg = etree.SubElement( rpc, arg_name )
if arg_value != True: arg.text = arg_value
if isinstance(arg_value, (tuple, list)):
for a in arg_value:
arg = etree.SubElement( rpc, arg_name )
if a != True: arg.text = a
else:
arg = etree.SubElement( rpc, arg_name )
if arg_value != True: arg.text = arg_value

# vargs[0] is a dict, command options like format='text'
if vargs:
Expand Down

0 comments on commit 4dd5c4f

Please sign in to comment.