Skip to content

Commit

Permalink
fix(push): reuse the tmp for reading instead of opening it manually
Browse files Browse the repository at this point in the history
Closes #11
  • Loading branch information
Caceresenzo committed May 24, 2023
1 parent 27f0a2d commit 4eb7274
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crunch/__version__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
__title__ = 'crunch-cli'
__description__ = 'crunch-cli - CLI of the CrunchDAO Platform'
__version__ = '1.4.3'
__version__ = '1.4.4'
__author__ = 'Enzo CACERES'
__author_email__ = '[email protected]'
__url__ = 'https://github.com/crunchdao/crunch-cli'
5 changes: 2 additions & 3 deletions crunch/command/push.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,10 @@ def push(
print(f"compress {file}")
tar.add(file)

fd = open(tmp.name, "rb")
fds.append(fd)
tmp.seek(0)

files = [
("codeFile", ('code.tar', fd, "application/x-tar"))
("codeFile", ('code.tar', tmp, "application/x-tar"))
]

for path, name in _list_model_files(model_directory_path):
Expand Down

0 comments on commit 4eb7274

Please sign in to comment.