Skip to content

Commit

Permalink
Make provider_index use spack yaml for cleaner output.
Browse files Browse the repository at this point in the history
  • Loading branch information
tgamblin committed Oct 28, 2016
1 parent d5925bf commit ad61950
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/spack/spack/provider_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit ad61950

Please sign in to comment.