Skip to content

Commit ea574c9

Browse files
committed
fix: UnboundLocalError: cannot access local variable netloc where it is not associated with a value
1 parent 8a0cfee commit ea574c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/check_jsonschema/utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ def filename2path(filename: str) -> pathlib.Path:
7373
netloc = ""
7474
elif WINDOWS:
7575
netloc = "\\\\" + urlinfo.netloc
76+
else:
77+
netloc = urlinfo.netloc
7678

7779
filename = urllib.request.url2pathname(netloc + urlinfo.path)
7880

0 commit comments

Comments
 (0)