Skip to content
Snippets Groups Projects
Commit 0b71db9a authored by pascal.mouquet_ird.fr's avatar pascal.mouquet_ird.fr
Browse files

new condition to clean corrupted products if no xml found

parent 3be06628
No related branches found
No related tags found
No related merge requests found
...@@ -438,6 +438,14 @@ class Tile: ...@@ -438,6 +438,14 @@ class Tile:
logger.info("Removing indice QL {}".format(q.name)) logger.info("Removing indice QL {}".format(q.name))
q.unlink() q.unlink()
nb_rm += 1 nb_rm += 1
for q in list(p.glob("*.jp2")):
if not (Path(str(q) + ".aux.xml")).exists():
logger.info("Missing metadata: {}".format(q.name))
nb_id += 1
if remove:
logger.info("Removing jp2 {}".format(q.name))
q.unlink()
nb_rm += 1
for q in p.glob("*.*"): for q in p.glob("*.*"):
if q.stat().st_size == 0: if q.stat().st_size == 0:
logger.info("Corrupted file {} (0B size)".format(q.name)) logger.info("Corrupted file {} (0B size)".format(q.name))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment