def __init__(self, config_file=None, default_profile='default'):
self.default_profile = default_profile
self.config = {
'default-profile': self.default_profile,
'requirements': None,
'profiles': {}}
if config_file:
self.config_file = config_file
else:
self.config_file = os.path.join(
click.get_app_dir('datafs'), 'config.yml')
# Create default directory if it does not exist
# If using a user-supplied file, they are responsible for creating
# the directory.
if not os.path.isdir(os.path.dirname(self.config_file)):
os.makedirs(os.path.dirname(self.config_file))
评论列表
文章目录