Skip to content

Commit

Permalink
use deepcopy instead of copy (#4713)
Browse files Browse the repository at this point in the history
* use deepcopy instead of copy

* changelog
  • Loading branch information
barryyosi-panw authored Dec 16, 2024
1 parent 6a1abfd commit 0cc5d75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .changelog/4713.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
changes:
- description: Fixed an issue where YmlSplitter attributes were being unintentionally updated.
type: fix
pr_number: 4713
3 changes: 2 additions & 1 deletion demisto_sdk/commands/split/ymlsplitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import os
import re
import shutil
from copy import deepcopy
from pathlib import Path
from typing import Optional

Expand Down Expand Up @@ -129,7 +130,7 @@ def extract_to_package_format(
yaml_out = f"{output_path}/{base_name}.yml"
logger.debug(f"Creating yml file: {yaml_out} ...")
if self.yml_data:
yaml_obj = self.yml_data.copy()
yaml_obj = deepcopy(self.yml_data)
else:
yaml_obj = get_file(self.input, raise_on_error=True)

Expand Down

0 comments on commit 0cc5d75

Please sign in to comment.