simplified

This commit is contained in:
Franco M 2023-11-14 18:14:27 +00:00
parent 90fd12bce1
commit 6c122b6117
1 changed files with 8 additions and 11 deletions

View File

@ -62,18 +62,15 @@ class Patcher(object):
prefix = "undetected"
self.user_multi_procs = user_multi_procs
try:
if version_main is not None:
if isinstance(version_main, (float, int, str)):
version_main = int(version_main)
self.is_old_chromedriver = version_main <= 114
else:
raise ValueError("version_main must be an integer or string")
if version_main is not None:
if isinstance(version_main, (float, int, str)):
version_main = int(version_main)
self.is_old_chromedriver = version_main <= 114
else:
version_main = 0
self.is_old_chromedriver = False
except ValueError:
raise
raise ValueError("version_main must be an integer or string")
else:
version_main = 0
self.is_old_chromedriver = False
# Needs to be called before self.exe_name is accessed
self._set_platform_name()