def _get_config(self):
        config = None
        possibles = [
            fs.abspath(os.path.join(self.basedir, 'boss.json')),
            fs.abspath(os.path.join(self.basedir, 'boss.yml')),
            ]

        for path in possibles:
            if os.path.exists(path):
                if os.path.basename(path) == 'boss.json':
                    config = self._get_json_config(path)
                    break
                elif os.path.basename(path) == 'boss.yml':
                    config = self._get_yaml_config(path)
                    break

        if not config:
            raise boss_exc.BossTemplateError("No supported config found.")

        # fix it up with some defaults
        if 'delimiters' not in config.keys():
            config['delimiters'] = ('@', '@')
            config['start_delimiter'] = config['delimiters'][0]
            config['end_delimiter'] = config['delimiters'][1]
        else:
            config['start_delimiter'] = config['delimiters'][0]
            config['end_delimiter'] = config['delimiters'][1]

        return config
dataset/ETHPy150Open datafolklabs/boss/boss/cli/template.py/TemplateManager._get_config/original