summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/spack/spack/util/spack_yaml.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/lib/spack/spack/util/spack_yaml.py b/lib/spack/spack/util/spack_yaml.py
index b3326d2959..d53f26350e 100644
--- a/lib/spack/spack/util/spack_yaml.py
+++ b/lib/spack/spack/util/spack_yaml.py
@@ -14,7 +14,6 @@
"""
import collections
import collections.abc
-import copy
import ctypes
import enum
import functools
@@ -400,20 +399,6 @@ class ConfigYAML:
return result.getvalue()
-def deepcopy(data):
- """Returns a deepcopy of the input YAML data."""
- result = copy.deepcopy(data)
-
- if isinstance(result, comments.CommentedMap):
- # HACK to fully copy ruamel CommentedMap that doesn't provide copy
- # method. Especially necessary for environments
- extracted_comments = extract_comments(data)
- if extracted_comments:
- set_comments(result, data_comments=extracted_comments)
-
- return result
-
-
def load_config(str_or_file):
"""Load but modify the loader instance so that it will add __line__
attributes to the returned object."""