Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
Torchaudio
Commits
488f36b4
"script/dgl_dev.yml.template" did not exist on "465828cdbc1adf570b4aa6c4922cc03bf7abdef2"
Unverified
Commit
488f36b4
authored
Apr 06, 2021
by
Mustafa Bal
Committed by
GitHub
Apr 06, 2021
Browse files
Fixed URLContext Leak (#1429)
parent
6d5e0ba6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
torchaudio/datasets/utils.py
torchaudio/datasets/utils.py
+2
-1
No files found.
torchaudio/datasets/utils.py
View file @
488f36b4
...
...
@@ -29,7 +29,8 @@ def stream_url(url: str,
# If we already have the whole file, there is no need to download it again
req
=
urllib
.
request
.
Request
(
url
,
method
=
"HEAD"
)
url_size
=
int
(
urllib
.
request
.
urlopen
(
req
).
info
().
get
(
"Content-Length"
,
-
1
))
with
urllib
.
request
.
urlopen
(
req
)
as
response
:
url_size
=
int
(
response
.
info
().
get
(
"Content-Length"
,
-
1
))
if
url_size
==
start_byte
:
return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment