Skip to content
Snippets Groups Projects
Commit 58e76721 authored by Todd Gamblin's avatar Todd Gamblin
Browse files

Make provider_index use spack yaml for cleaner output.

parent da760a66
Branches
Tags
No related merge requests found
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
from itertools import product as iproduct from itertools import product as iproduct
from pprint import pformat from pprint import pformat
import yaml import spack.util.spack_yaml as syaml
from yaml.error import MarkedYAMLError from yaml.error import MarkedYAMLError
import spack import spack
...@@ -190,13 +190,13 @@ def to_yaml(self, stream=None): ...@@ -190,13 +190,13 @@ def to_yaml(self, stream=None):
lambda vpkg, pset: [ lambda vpkg, pset: [
vpkg.to_node_dict(), [p.to_node_dict() for p in pset]], list) vpkg.to_node_dict(), [p.to_node_dict() for p in pset]], list)
yaml.dump({'provider_index': {'providers': provider_list}}, syaml.dump({'provider_index': {'providers': provider_list}},
stream=stream) stream=stream)
@staticmethod @staticmethod
def from_yaml(stream): def from_yaml(stream):
try: try:
yfile = yaml.load(stream) yfile = syaml.load(stream)
except MarkedYAMLError, e: except MarkedYAMLError, e:
raise spack.spec.SpackYAMLError( raise spack.spec.SpackYAMLError(
"error parsing YAML ProviderIndex cache:", str(e)) "error parsing YAML ProviderIndex cache:", str(e))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment