File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ def __init__(
61
61
# Configuration
62
62
self .enable_gpu = kwargs .pop ("enable_gpu" , False )
63
63
self .enable_sandbox = kwargs .pop ("enable_sandbox" , False )
64
+ self ._tmpdir_path = kwargs .pop ("tmp_path" , None )
64
65
if len (kwargs ):
65
66
raise ValueError (f"Unknown keyword arguments: { kwargs } " )
66
67
self .headless = headless
@@ -92,8 +93,11 @@ def __init__(
92
93
raise BrowserFailedError (
93
94
"Could not find an acceptable browser. Please set environmental variable BROWSER_PATH or pass `path=/path/to/browser` into the Browser() constructor."
94
95
)
95
- if path .contains ("snap" ):
96
- self ._snap = True
96
+
97
+ if self ._tmpdir_path :
98
+ temp_args = dict (dir = self ._tmpdir_path )
99
+ elif path .contains ("snap" ):
100
+ self ._tmpdir_path = Path .home ()
97
101
if self .debug :
98
102
print ("Snap detected, moving tmp directory to home" , file = sys .stderr )
99
103
temp_args = dict (prefix = ".choreographer-" , dir = Path .home ())
You can’t perform that action at this time.
0 commit comments