Make provider_index use spack yaml for cleaner output.
This commit is contained in:
parent
da760a66de
commit
58e76721b9
@ -28,7 +28,7 @@
|
||||
from itertools import product as iproduct
|
||||
from pprint import pformat
|
||||
|
||||
import yaml
|
||||
import spack.util.spack_yaml as syaml
|
||||
from yaml.error import MarkedYAMLError
|
||||
|
||||
import spack
|
||||
@ -190,13 +190,13 @@ def to_yaml(self, stream=None):
|
||||
lambda vpkg, pset: [
|
||||
vpkg.to_node_dict(), [p.to_node_dict() for p in pset]], list)
|
||||
|
||||
yaml.dump({'provider_index': {'providers': provider_list}},
|
||||
stream=stream)
|
||||
syaml.dump({'provider_index': {'providers': provider_list}},
|
||||
stream=stream)
|
||||
|
||||
@staticmethod
|
||||
def from_yaml(stream):
|
||||
try:
|
||||
yfile = yaml.load(stream)
|
||||
yfile = syaml.load(stream)
|
||||
except MarkedYAMLError, e:
|
||||
raise spack.spec.SpackYAMLError(
|
||||
"error parsing YAML ProviderIndex cache:", str(e))
|
||||
|
Loading…
Reference in New Issue
Block a user