From fa7bd104a037d851141d441b6cc68a996ae2a214 Mon Sep 17 00:00:00 2001 From: sjay8 Date: Sun, 9 Mar 2025 14:25:45 -0700 Subject: [PATCH] fixed spacing issues-2 --- agentic_security/http_spec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agentic_security/http_spec.py b/agentic_security/http_spec.py index fafe68c..9d1e8d6 100644 --- a/agentic_security/http_spec.py +++ b/agentic_security/http_spec.py @@ -162,8 +162,8 @@ def parse_http_spec(http_spec: str) -> LLMSpec: # Check url validity valid_url= urlparse(url) - # - if valid_url.scheme not in ("http", "https") or not valid_url.netloc: # if missing the correct formatting ://, urlparse.netloc will be empty + # if missing the correct formatting ://, urlparse.netloc will be empty + if valid_url.scheme not in ("http", "https") or not valid_url.netloc: raise InvalidHTTPSpecError(f"Invalid URL: {url}. Ensure it starts with 'http://' or 'https://'") # Initialize headers and body