adjust file path checking

This commit is contained in:
Thephaseless 2024-07-25 00:04:22 +00:00
parent 8270020bff
commit 613ab2fd40

View File

@ -10,7 +10,9 @@ env_path = os.getenv("VIRTUAL_ENV")
if env_path is None: if env_path is None:
env_path = Path(os.__file__).parent.parent.parent.as_posix() env_path = Path(os.__file__).parent.parent.parent.as_posix()
nodriver_path = Path(env_path + "/lib/python3.11/site-packages/nodriver/cdp/network.py") nodriver_path = Path(env_path + "/lib/python3.11/site-packages/nodriver/cdp/network.py")
if not nodriver_path.exists():
msg = f"{nodriver_path} not found"
raise FileNotFoundError(msg)
new_cookie_partition_key = """\ new_cookie_partition_key = """\
if isinstance(json, str): if isinstance(json, str):