Skip to content

Commit 78fce6c

Browse files
use deep copy to avoid modification to original args
1 parent 9135819 commit 78fce6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/diffpy/labpdfproc/tools.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import copy
12
from pathlib import Path
23

34
from diffpy.utils.tools import get_package_info, get_user_info
@@ -231,7 +232,7 @@ def load_metadata(args, filepath):
231232
A dictionary with relevant arguments from the parser
232233
"""
233234

234-
metadata = vars(args)
235+
metadata = copy.deepcopy(vars(args))
235236
for key in METADATA_KEYS_TO_EXCLUDE:
236237
metadata.pop(key, None)
237238
metadata["input_directory"] = str(filepath)

0 commit comments

Comments
 (0)