File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def reset_downloads_folder():
34
34
def reset_downloads_folder_assistant (archived_downloads_folder ):
35
35
if not os .path .exists (archived_downloads_folder ):
36
36
try :
37
- os .makedirs (archived_downloads_folder )
37
+ os .makedirs (archived_downloads_folder , exist_ok = True )
38
38
except Exception :
39
39
pass # Should only be reachable during multi-threaded test runs
40
40
new_archived_downloads_sub_folder = "%s/downloads_%s" % (
@@ -45,7 +45,7 @@ def reset_downloads_folder_assistant(archived_downloads_folder):
45
45
if not os .listdir (downloads_path ) == []:
46
46
try :
47
47
shutil .move (downloads_path , new_archived_downloads_sub_folder )
48
- os .makedirs (downloads_path )
48
+ os .makedirs (downloads_path , exist_ok = True )
49
49
except Exception :
50
50
pass
51
51
if not settings .ARCHIVE_EXISTING_DOWNLOADS :
Original file line number Diff line number Diff line change @@ -1682,7 +1682,10 @@ def _create_dashboard_assets_():
1682
1682
abs_path = os .path .abspath ("." )
1683
1683
assets_folder = os .path .join (abs_path , "assets" )
1684
1684
if not os .path .exists (assets_folder ):
1685
- os .makedirs (assets_folder )
1685
+ try :
1686
+ os .makedirs (assets_folder , exist_ok = True )
1687
+ except Exception :
1688
+ pass
1686
1689
pytest_style_css = os .path .join (assets_folder , "pytest_style.css" )
1687
1690
add_pytest_style_css = True
1688
1691
if os .path .exists (pytest_style_css ):
You can’t perform that action at this time.
0 commit comments