kopia lustrzana https://github.com/jupyterhub/repo2docker
add review suggestion
rodzic
c231531f72
commit
a6e02c8715
|
@ -54,7 +54,7 @@ def execute_cmd(cmd, capture=False, **kwargs):
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def maybe_cleanup(path, cleanup=False):
|
def maybe_cleanup(path, cleanup=False):
|
||||||
"""Execute cleanup of the passed path when cleanup flag is True."""
|
"""Delete the directory at passed path if cleanup flag is True."""
|
||||||
yield
|
yield
|
||||||
if cleanup:
|
if cleanup:
|
||||||
shutil.rmtree(path, ignore_errors=True)
|
shutil.rmtree(path, ignore_errors=True)
|
||||||
|
|
Ładowanie…
Reference in New Issue