Skip to content

Commit

Permalink
Use copy.deepcopy instead of just dict.copy
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceaulinic committed Jun 26, 2018
1 parent 50457a5 commit bf7baae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion salt/utils/napalm.py
Expand Up @@ -17,6 +17,7 @@

# Import Python libs
from __future__ import absolute_import, unicode_literals, print_function
import copy
import traceback
import logging
import importlib
Expand Down Expand Up @@ -422,7 +423,7 @@ def func_wrapper(*args, **kwargs):
napalm_opts.update(inventory_opts)
log.debug('Merging the config for %s with the details found in the napalm inventory:', host)
log.debug(napalm_opts)
opts = opts.copy() # make sure we don't override the original
opts = copy.deepcopy(opts) # make sure we don't override the original
# opts, but just inject the CLI args from the kwargs to into the
# object manipulated by ``get_device_opts`` to extract the
# connection details, then use then to establish the connection.
Expand Down

0 comments on commit bf7baae

Please sign in to comment.