summaryrefslogtreecommitdiff
path: root/lib/spack/external/ruamel/yaml/compat.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/external/ruamel/yaml/compat.py')
-rw-r--r--lib/spack/external/ruamel/yaml/compat.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/spack/external/ruamel/yaml/compat.py b/lib/spack/external/ruamel/yaml/compat.py
index a1778bef28..28a981dc43 100644
--- a/lib/spack/external/ruamel/yaml/compat.py
+++ b/lib/spack/external/ruamel/yaml/compat.py
@@ -12,9 +12,12 @@ try:
from ruamel.ordereddict import ordereddict
except:
try:
- from collections import OrderedDict
+ from collections.abc import OrderedDict
except ImportError:
- from ordereddict import OrderedDict
+ try:
+ from collections import OrderedDict
+ except ImportError:
+ from ordereddict import OrderedDict
# to get the right name import ... as ordereddict doesn't do that
class ordereddict(OrderedDict):