Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
c01c0877
Commit
c01c0877
authored
Aug 06, 2021
by
Antoine Kaufmann
Browse files
experiments: fix cleanup in local executor (rmtree)
rmtree was only deleting directories but not files and sockets.
parent
21657f48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
experiments/simbricks/exectools.py
experiments/simbricks/exectools.py
+4
-1
No files found.
experiments/simbricks/exectools.py
View file @
c01c0877
...
@@ -309,7 +309,10 @@ class LocalExecutor(Executor):
...
@@ -309,7 +309,10 @@ class LocalExecutor(Executor):
pathlib
.
Path
(
path
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
pathlib
.
Path
(
path
).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
async
def
rmtree
(
self
,
path
,
verbose
=
False
):
async
def
rmtree
(
self
,
path
,
verbose
=
False
):
shutil
.
rmtree
(
path
,
ignore_errors
=
True
)
if
os
.
path
.
isdir
(
path
):
shutil
.
rmtree
(
path
,
ignore_errors
=
True
)
elif
os
.
path
.
exists
(
path
):
os
.
unlink
(
path
)
class
RemoteExecutor
(
Executor
):
class
RemoteExecutor
(
Executor
):
def
__init__
(
self
,
host_name
,
workdir
):
def
__init__
(
self
,
host_name
,
workdir
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment