Exemple #1
0
def _list_unpacked(src, unpack_dir):
    unpacked_src = _unpacked_src(unpack_dir, src)
    unpacked_time = util.getmtime(unpacked_src)
    if not unpacked_time or unpacked_time < util.getmtime(src):
        return None
    lines = open(unpacked_src, "r").readlines()
    return [l.rstrip() for l in lines]
Exemple #2
0
def _read_cached_unpacked(source_path, unpack_dir):
    cache_path = _unpacked_cache_path(unpack_dir, source_path)
    cache_time = util.getmtime(cache_path)
    if not cache_time or cache_time < util.getmtime(source_path):
        return None
    lines = open(cache_path, "r").readlines()
    return [l.rstrip() for l in lines]