Update (fix) to __init__.py

Added a try-except block on time.sleep(0.1) at line 785 which was causing errors in the implementations.
This commit is contained in:
Carlos Herrera 2023-08-05 20:39:19 -03:00 committed by GitHub
parent 1c704a71cf
commit f756f523fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -782,7 +782,10 @@ class Chrome(selenium.webdriver.chrome.webdriver.WebDriver):
else:
logger.debug("successfully removed %s" % self.user_data_dir)
break
time.sleep(0.1)
try:
time.sleep(0.1)
except OSError:
pass
# dereference patcher, so patcher can start cleaning up as well.
# this must come last, otherwise it will throw 'in use' errors