File size: 426 Bytes
065fee7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import logging
from pathlib import Path
import shutil
import sys


_LOGGER = logging.getLogger(__name__)


def trim(base_folder):
    base_folder = Path(base_folder)
    for aio_folder in Path(base_folder).glob("**/aio"):
        _LOGGER.info("Working on %s", aio_folder)
        shutil.rmtree(aio_folder)  # Let it throw at worst


if __name__ == "__main__":
    logging.basicConfig(level=logging.INFO)
    trim(sys.argv[1])