Skip to content

Commit 194750d

Browse files
committed
Make try_parse_url_path null-safe
1 parent de3977b commit 194750d

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

aikido_zen/helpers/try_parse_url_path.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ def try_parse_url(url):
1717

1818
def try_parse_url_path(url):
1919
"""Try and parse url path"""
20+
if not url:
21+
return None
22+
2023
parsed = try_parse_url(f"http://localhost{url}" if url.startswith("/") else url)
2124

2225
if not parsed or not parsed.scheme:

0 commit comments

Comments
 (0)