chromedriver custom path issue fixed
This commit is contained in:
parent
cea80717c5
commit
b50c6cbd6f
|
@ -129,17 +129,6 @@ class Patcher(object):
|
||||||
Returns:
|
Returns:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
p = pathlib.Path(self.data_path)
|
|
||||||
if self.user_multi_procs:
|
|
||||||
with Lock():
|
|
||||||
files = list(p.rglob("*chromedriver*"))
|
|
||||||
most_recent = max(files, key=lambda f: f.stat().st_mtime)
|
|
||||||
files.remove(most_recent)
|
|
||||||
list(map(lambda f: f.unlink(), files))
|
|
||||||
if self.is_binary_patched(most_recent):
|
|
||||||
self.executable_path = str(most_recent)
|
|
||||||
return True
|
|
||||||
|
|
||||||
if executable_path:
|
if executable_path:
|
||||||
self.executable_path = executable_path
|
self.executable_path = executable_path
|
||||||
self._custom_exe_path = True
|
self._custom_exe_path = True
|
||||||
|
@ -150,6 +139,17 @@ class Patcher(object):
|
||||||
return self.patch_exe()
|
return self.patch_exe()
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
p = pathlib.Path(self.data_path)
|
||||||
|
if self.user_multi_procs:
|
||||||
|
with Lock():
|
||||||
|
files = list(p.rglob("*chromedriver*"))
|
||||||
|
most_recent = max(files, key=lambda f: f.stat().st_mtime)
|
||||||
|
files.remove(most_recent)
|
||||||
|
list(map(lambda f: f.unlink(), files))
|
||||||
|
if self.is_binary_patched(most_recent):
|
||||||
|
self.executable_path = str(most_recent)
|
||||||
|
return True
|
||||||
|
|
||||||
if version_main:
|
if version_main:
|
||||||
self.version_main = version_main
|
self.version_main = version_main
|
||||||
|
|
Loading…
Reference in New Issue