Skip to content

Commit

Permalink
created copies using deepcopy before performing merge
Browse files Browse the repository at this point in the history
Signed-off-by: aadityasinha-dotcom <[email protected]>
  • Loading branch information
aadityasinha-dotcom committed Sep 21, 2023
1 parent 70234f0 commit 49221bd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/core/zowe/core_for_zowe_sdk/profile_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import warnings
from typing import Optional
from deepmerge import always_merger
from copy import deepcopy

from .config_file import ConfigFile, Profile
from .custom_warnings import (
Expand Down Expand Up @@ -284,10 +285,18 @@ def load(

usrProject = self.project_user_config.profiles
project = self.project_config.profiles

# Creating copies of the usrProject and project objects
usrProjectCopy = deepcopy(usrProject)
projectCopy = deepcopy(project)
prjt = always_merger.merge(usrProject, project)

usrGlobal = self.global_user_config.profiles
glbal = self.global_config.profiles

# Creating copies of the usrGlobal and glbal objects
usrGlobalCopy = deepcopy(usrGlobal)
glbalCopy = deepcopy(glbal)
glbl = always_merger.merge(usrGlobal, glbal)

if override_with_env:
Expand Down

0 comments on commit 49221bd

Please sign in to comment.