utils.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:fabric8-analytics-tagger 作者: fabric8-analytics 项目源码 文件源码
def get_files_dir():
    """Get directory for config and remote files."""
    try:
        home = Path.home()
    except AttributeError:
        # Fix for older Python version were Path has no 'home' attribute
        home = os.getenv('HOME', '/tmp/')  # Ignore B108
    files_dir = os.path.join(home, '.fabric8-analytics-tagger')
    if not os.path.exists(files_dir):
        os.makedirs(files_dir)

    return files_dir
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号