Skip to content

Commit

Permalink
old data passed in get should not be imposed on new get() call
Browse files Browse the repository at this point in the history
  • Loading branch information
Nitin Kumar committed Dec 12, 2019
1 parent 0a88d6b commit 7857999
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/jnpr/junos/factory/cmdtable.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,12 @@ def get(self, *vargs, **kvargs):
str) else \
kvargs['filters']

cmd_args = self.CMD_ARGS.copy()
if 'args' in kvargs and isinstance(kvargs['args'], dict):
self.CMD_ARGS.update(kvargs['args'])
cmd_args.update(kvargs['args'])

if len(self.CMD_ARGS) > 0:
self.GET_CMD = Template(self.GET_CMD).render(**self.CMD_ARGS)
if len(cmd_args) > 0:
self.GET_CMD = Template(self.GET_CMD).render(**cmd_args)

# execute the Junos RPC to retrieve the table
if hasattr(self, 'TARGET'):
Expand Down

0 comments on commit 7857999

Please sign in to comment.