1
0
Fork 0
mirror of synced 2024-11-17 05:55:34 -05:00
dotbot/dotbot/config.py
2014-03-20 18:57:56 -04:00

19 lines
481 B
Python

import json
class ConfigReader(object):
def __init__(self, config_file_path):
self._config = self._read(config_file_path)
def _read(self, config_file_path):
try:
with open(config_file_path) as fin:
data = json.load(fin)
return data
except Exception:
raise ReadingError('Could not read config file')
def get_config(self):
return self._config
class ReadingError(Exception):
pass