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
bdf92553
Unverified
Commit
bdf92553
authored
Nov 25, 2019
by
Vincent QB
Committed by
GitHub
Nov 25, 2019
Browse files
correct file_obj reference. (#352)
parent
89a108c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torchaudio/datasets/utils.py
torchaudio/datasets/utils.py
+1
-1
No files found.
torchaudio/datasets/utils.py
View file @
bdf92553
...
@@ -183,7 +183,7 @@ def validate_file(file_obj, hash_value, hash_type="sha256"):
...
@@ -183,7 +183,7 @@ def validate_file(file_obj, hash_value, hash_type="sha256"):
while
True
:
while
True
:
# Read by chunk to avoid filling memory
# Read by chunk to avoid filling memory
chunk
=
f
.
read
(
1024
**
2
)
chunk
=
f
ile_obj
.
read
(
1024
**
2
)
if
not
chunk
:
if
not
chunk
:
break
break
hash_func
.
update
(
chunk
)
hash_func
.
update
(
chunk
)
...
...
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