Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
e2810edc
Commit
e2810edc
authored
Jan 07, 2020
by
Dima Galat
Browse files
removing redundant .flush
parent
d0e594f9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
+0
-2
src/transformers/file_utils.py
src/transformers/file_utils.py
+0
-2
No files found.
src/transformers/file_utils.py
View file @
e2810edc
...
...
@@ -385,8 +385,6 @@ def get_from_cache(
else
:
http_get
(
url
,
temp_file
,
proxies
=
proxies
,
resume_size
=
resume_size
,
user_agent
=
user_agent
)
# we are copying the file before closing it, so flush to avoid truncation
temp_file
.
flush
()
logger
.
info
(
"storing %s in cache at %s"
,
url
,
cache_path
)
os
.
rename
(
temp_file
.
name
,
cache_path
)
...
...
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