From 326e3a6976a7fb4cd0a7ec242cd435e63eaaaafa Mon Sep 17 00:00:00 2001 From: DeviousStoat Date: Fri, 21 Mar 2025 14:59:04 +0100 Subject: [PATCH] Fix unbound exception ip function --- pythonlib/camoufox/ip.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pythonlib/camoufox/ip.py b/pythonlib/camoufox/ip.py index 1905809..9722914 100644 --- a/pythonlib/camoufox/ip.py +++ b/pythonlib/camoufox/ip.py @@ -101,7 +101,7 @@ def public_ip(proxy: Optional[str] = None) -> str: "https://ipecho.net/plain", ] - exception = None + end_exception = None for url in URLS: try: with _suppress_insecure_warning(): @@ -116,5 +116,5 @@ def public_ip(proxy: Optional[str] = None) -> str: validate_ip(ip) return ip except (requests.exceptions.ProxyError, requests.RequestException, InvalidIP) as exception: - pass - raise InvalidIP(f"Failed to get IP address: {exception}") + end_exception = exception + raise InvalidIP(f"Failed to get IP address: {end_exception}")