INNER CODE UNIT · Python
create_default_config
opsdroid/opsdroid · opsdroid/configuration/__init__.py:23
def create_default_config(config_path):
"""Create a default config file based on the example config file.
If we can't find any configuration.yaml, we will pull the whole
example_configuration.yaml and use this file as the configuration.
Args:
config_path: String containing the path to configuration.yaml
default install location
Returns:
str: path to configuration.yaml default install location
"""
_LOGGER.info("Creating %s.", config_path)
config_dir, _ = os.path.split(config_path)
if not os.path.isdir(config_dir):
os.makedirs(config_dir)