From 613ab2fd40e4d3342b85b6e853a58502edea09fe Mon Sep 17 00:00:00 2001 From: Thephaseless Date: Thu, 25 Jul 2024 00:04:22 +0000 Subject: [PATCH] adjust file path checking --- fix_nodriver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fix_nodriver.py b/fix_nodriver.py index aabb64e..1e7c0bb 100644 --- a/fix_nodriver.py +++ b/fix_nodriver.py @@ -10,7 +10,9 @@ env_path = os.getenv("VIRTUAL_ENV") if env_path is None: env_path = Path(os.__file__).parent.parent.parent.as_posix() 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 = """\ if isinstance(json, str):