ingest_jobscripts.py 文件源码

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

项目:supremm 作者: ubccr 项目源码 文件源码
def pathfilter(path, mindate):
    """ return whether path should not be processed based on mindate
        return value of False indicates no filtering
        return value of true indicates the path should be filtered
    """

    if mindate == None:
        return False

    subdir = os.path.basename(path)
    try:
        if datetime.strptime(subdir, "%Y%m%d") < mindate:
            logging.debug("Skip(1) subdir %s", subdir)
            return True
    except ValueError:
        logging.debug("Skip(2) subdir %s", subdir)
        return True

    return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号