# Iterate over the extracted CTA tape pools and re-fill them with supply tapes as needed
for tapepool in tapepools:
logging.info("Tape pool: " + tapepool["name"] + " which should have at least: " + tapepool["numPartialTapes"] + " partial tape(s) is supplied from: " + tapepool["supply"])
if (tapepool["numPartialTapes"] and tapepool["supply"]):
# Check if re-filling is actually needed
currentpartialtapes = len([tape for tape in extract_tapes("ALL", tapepool["name"])])
if (currentpartialtapes < int(tapepool["numPartialTapes"])):