Skip to content

Commit 3836140

Browse files
committed
use copy() method rather than copy.deepcopy on EasyConfig instances
1 parent b0ced05 commit 3836140

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

easybuild/framework/easyconfig/easyconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ def process_easyconfig(path, build_specs=None, validate=True, parse_only=False,
906906
if build_specs is None:
907907
cache_key = (path, validate, hidden, parse_only)
908908
if cache_key in _easyconfigs_cache:
909-
return copy.deepcopy(_easyconfigs_cache[cache_key])
909+
return [e.copy() for e in _easyconfigs_cache[cache_key]]
910910

911911
easyconfigs = []
912912
for spec in blocks:
@@ -965,7 +965,7 @@ def process_easyconfig(path, build_specs=None, validate=True, parse_only=False,
965965
easyconfig['unresolved_deps'] = copy.deepcopy(easyconfig['dependencies'])
966966

967967
if cache_key is not None:
968-
_easyconfigs_cache[cache_key] = copy.deepcopy(easyconfigs)
968+
_easyconfigs_cache[cache_key] = [e.copy() for e in easyconfigs]
969969

970970
return easyconfigs
971971

0 commit comments

Comments
 (0)