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 3b4a74f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/spack/spack/provider_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

import spack
import spack.error
import spack.util.spack_yaml as syaml


class ProviderIndex(object):
Expand Down Expand Up @@ -190,13 +191,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 3b4a74f

Please sign in to comment.