diff options
Diffstat (limited to 'overseerlib/parseyaml.py')
-rw-r--r-- | overseerlib/parseyaml.py | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/overseerlib/parseyaml.py b/overseerlib/parseyaml.py deleted file mode 100644 index 8aacfa7..0000000 --- a/overseerlib/parseyaml.py +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/python -# -# Copyright (C) 2014 Codethink Limited -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - -import yaml - -import cliapp - - -class ParseYAML(object): - - def load_config(self, config): - with open(config) as f: - text = f.read() - try: - obj = yaml.safe_load(text) - except yaml.error.YAMLError as e: - raise cliapp.AppException('Could not load configuration file') - - return obj |