def config_path(self): import os cls = self.__class__ configfile_names = list( generate_configfile_names(cls.config_files, cls.config_searchpath)) config_param = Param(type=click.File("r")) config_file = config_param.parse(configfile_names[0]) return os.path.realpath(config_file.name)
def config_path(self): import os cls = self.__class__ config_param = Param(type=click.File('r')) configfile_names = list( generate_configfile_names(cls.config_files, cls.config_searchpath)) if configfile_names: for name in configfile_names: config_file = config_param.parse(name) path = os.path.realpath(config_file.name) else: path = os.getcwd() return path