mirror of
https://gitee.com/g1879/DrissionPage.git
synced 2024-12-10 04:00:23 +08:00
修正变量类型
This commit is contained in:
parent
36e4362d71
commit
d1aa92ee15
@ -8,11 +8,10 @@
|
|||||||
from configparser import RawConfigParser, NoSectionError, NoOptionError
|
from configparser import RawConfigParser, NoSectionError, NoOptionError
|
||||||
from http.cookiejar import Cookie
|
from http.cookiejar import Cookie
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Union
|
|
||||||
|
|
||||||
from requests.cookies import RequestsCookieJar
|
from requests.cookies import RequestsCookieJar
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
from selenium.webdriver.chrome.options import Options
|
from selenium.webdriver.chrome.options import Options
|
||||||
|
from typing import Any, Union
|
||||||
|
|
||||||
|
|
||||||
class OptionsManager(object):
|
class OptionsManager(object):
|
||||||
@ -399,7 +398,7 @@ class SessionOptions(object):
|
|||||||
path = path / 'config.ini' if path.is_dir() else path
|
path = path / 'config.ini' if path.is_dir() else path
|
||||||
|
|
||||||
if path.exists():
|
if path.exists():
|
||||||
om = OptionsManager(path)
|
om = OptionsManager(str(path))
|
||||||
else:
|
else:
|
||||||
om = OptionsManager(self.ini_path or str(Path(__file__).parent / 'configs.ini'))
|
om = OptionsManager(self.ini_path or str(Path(__file__).parent / 'configs.ini'))
|
||||||
|
|
||||||
@ -466,7 +465,7 @@ class DriverOptions(Options):
|
|||||||
path = path / 'config.ini' if path.is_dir() else path
|
path = path / 'config.ini' if path.is_dir() else path
|
||||||
|
|
||||||
if path.exists():
|
if path.exists():
|
||||||
om = OptionsManager(path)
|
om = OptionsManager(str(path))
|
||||||
else:
|
else:
|
||||||
om = OptionsManager(self.ini_path or str(Path(__file__).parent / 'configs.ini'))
|
om = OptionsManager(self.ini_path or str(Path(__file__).parent / 'configs.ini'))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user