Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

changed from YAML to JSON #66

Merged
merged 1 commit into from
Jul 14, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions common.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import distutils.spawn
import glob
import json
import os.path
import re
import shutil
Expand All @@ -10,7 +11,6 @@
from subprocess import PIPE
from subprocess import Popen
import sys
import yaml

from mpienv.ompi import parse_ompi_info
from mpienv.py import MPI4Py
Expand Down Expand Up @@ -275,10 +275,10 @@ def _load_mpi_info(self):
self._installed[name] = info

def _load_config(self):
conf_yml = os.path.join(self._root_dir, "config.yml")
if os.path.exists(conf_yml):
with open(conf_yml) as f:
conf = yaml.load(f)
conf_json = os.path.join(self._root_dir, "config.json")
if os.path.exists(conf_json):
with open(conf_json) as f:
conf = json.load(f)
else:
sys.stderr.write("Warning: Cannot find config file\n")
conf = {}
Expand Down