Skip to content

Commit 2f12231

Browse files
committed
fix(utils): only verify netloc if scheme isn't data
Fixes #249
1 parent 99a570d commit 2f12231

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/webexpythonsdk/models/cards/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,8 @@ def validate_uri(
226226
if not parsed_uri.scheme:
227227
raise URIException("Invalid URI: Missing scheme")
228228

229-
# Check if the URI has a heir-part location
230-
if not parsed_uri.netloc:
229+
# Check if the URI has a heir-part location if scheme isn't "data"
230+
if parsed_uri.scheme != "data" and not parsed_uri.netloc:
231231
raise URIException("Invalid URI: Missing heir part location")
232232

233233
# Return if every check is passed

0 commit comments

Comments
 (0)