File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -60,12 +60,13 @@ def __init__(
6060 # Every launcher starts with an empty execution directory...
6161 print (f"Removing execution directory ({ EXECUTION_DIRECTORY } )" )
6262 assert EXECUTION_DIRECTORY .startswith ("tests/project-root" )
63- for filename in os .listdir (EXECUTION_DIRECTORY ):
64- file_path = os .path .join (EXECUTION_DIRECTORY , filename )
65- if os .path .isfile (file_path ) or os .path .islink (file_path ):
66- os .unlink (file_path )
67- elif os .path .isdir (file_path ):
68- shutil .rmtree (file_path )
63+ if os .path .isdir (EXECUTION_DIRECTORY ):
64+ for filename in os .listdir (EXECUTION_DIRECTORY ):
65+ file_path = os .path .join (EXECUTION_DIRECTORY , filename )
66+ if os .path .isfile (file_path ) or os .path .islink (file_path ):
67+ os .unlink (file_path )
68+ elif os .path .isdir (file_path ):
69+ shutil .rmtree (file_path )
6970
7071 def launch (self , launch_parameters : LaunchParameters ) -> LaunchResult :
7172 assert launch_parameters
You can’t perform that action at this time.
0 commit comments