Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
Moves old archive files into archive directory

        def tidy_archives():
    """ Moves old archive files into archive directory"""
    LOG.debug("Tidying archives")
    base_dir = config.ank_main_dir
    files_to_archive = glob.glob(os.path.join(base_dir, "*.tar.gz"))

#TODO: make this set in config
    archive_dir = os.path.join(base_dir, "archive")
    if not os.path.exists(archive_dir):
        os.mkdir(archive_dir)

    for fname in files_to_archive:
        file_basename = os.path.basename(fname)
        file_dest = os.path.join(archive_dir, file_basename)
        shutil.move(fname, file_dest)

    return
        


src/a/n/ank_le-HEAD/AutoNetkit/internet.py   ank_le(Download)
 
        # Clean up old archives
        ank.tidy_archives()
 
        #TODO: