From 33d602bb9304b2daf54a5754f5fb51cfcad350dc Mon Sep 17 00:00:00 2001 From: Anish Athalye Date: Mon, 27 Oct 2014 20:04:00 -0400 Subject: Add YAML support Add support for YAML format configuration files. In addition, this commit adds instructions about YAML config files to the README, and it also changes the README to encourage use of YAML instead of JSON. --- dotbot/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dotbot/config.py') diff --git a/dotbot/config.py b/dotbot/config.py index 79b735c..49252d8 100644 --- a/dotbot/config.py +++ b/dotbot/config.py @@ -1,4 +1,4 @@ -import json +import yaml class ConfigReader(object): def __init__(self, config_file_path): @@ -7,7 +7,7 @@ class ConfigReader(object): def _read(self, config_file_path): try: with open(config_file_path) as fin: - data = json.load(fin) + data = yaml.load(fin) return data except Exception: raise ReadingError('Could not read config file') -- cgit v1.2.3