def _read_yaml(self, path):
        '''
        reads a yaml-formatted configuration file at the given path and
        returns a python dictionary with the pared items in it.
        '''
        try:
            with open(path) as stream:
                return yaml.load(stream)
        except yaml.parser.ParserError as yamlerr:
            print("Failed to parse configfile: {0}".format(path))
            print(yamlerr)
            sys.exit(1)
        except yaml.scanner.ScannerError as yamlerr:
            print("Failed to parse configfile: {0}".format(path))
            print(yamlerr)
            sys.exit(1)
        except __HOLE__ as ioerr:
            print("Failed to read configfile:")
            print(os.strerror(ioerr.errno))
            sys.exit(1)
        except OSError as oserr:
            print("Failed to read configfile:")
            print(os.strerror(oserr.errno))
            sys.exit(1)
dataset/ETHPy150Open felskrone/salt-eventsd/salteventsd/loader.py/SaltEventsdLoader._read_yaml