File tree 1 file changed +3
-2
lines changed
src/py-opentimelineio/opentimelineio
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import os
7
7
import urllib
8
+ from urllib import request
8
9
import pathlib
9
10
10
11
@@ -23,7 +24,7 @@ def url_from_filepath(fpath):
23
24
try :
24
25
# appears to handle absolute windows paths better, which are absolute
25
26
# and start with a drive letter.
26
- return urllib .urlparse .unquote (pathlib .PurePath (fpath ).as_uri ())
27
+ return urllib .parse .unquote (pathlib .PurePath (fpath ).as_uri ())
27
28
except ValueError :
28
29
# scheme is "file" for absolute paths, else ""
29
30
scheme = "file" if os .path .isabs (fpath ) else ""
@@ -63,7 +64,7 @@ def filepath_from_url(urlstr):
63
64
64
65
# Convert the parsed URL to a path
65
66
filepath = pathlib .PurePath (
66
- urllib . request .url2pathname (decoded_parsed_path )
67
+ request .url2pathname (decoded_parsed_path )
67
68
)
68
69
69
70
# If the network location is a window drive, reassemble the path
You can’t perform that action at this time.
0 commit comments