Skip to content
Snippets Groups Projects
Commit f8a13718 authored by vlorentz's avatar vlorentz
Browse files

luigi: Clean up partial local exports before exporting again

parent 9a194f42
No related branches found
Tags v1.4.1
No related merge requests found
......@@ -116,6 +116,7 @@ for readability; but `they can be used interchangeably <https://luigi.readthedoc
# control
import enum
from pathlib import Path
import shutil
from typing import Hashable, Iterator, List, TypeVar, Union
import luigi
......@@ -296,6 +297,8 @@ class ExportGraph(luigi.Task):
for output in self.output():
if output.exists():
output.remove()
if self.local_export_path.exists(): # type: ignore[operator]
shutil.rmtree(self.local_export_path)
conf = config.read(self.config_file)
......
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