Skip to content

Commit

Permalink
updated gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ethantang95 committed May 26, 2017
1 parent 239adc3 commit 2db4f57
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,7 @@ TAGS

#.project
.project


/examples/binary-segmentation/out/
/examples/binary-segmentation/out2/
10 changes: 5 additions & 5 deletions digits/model/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,13 @@ def download(job_id, extension):
mode = 'gz'
elif extension in ['tar.bz2']:
mode = 'bz2'
with tarfile.open(fileobj=b, mode='w:%s' % mode) as tf:
with tarfile.open(fileobj=b, mode='w:%s' % mode) as tar:
for path, name in job.download_files(epoch):
tf.add(path, arcname=name)
tf_info = tarfile.TarInfo("info.json")
tf_info.size = len(info_io.getvalue())
tar.add(path, arcname=name)
tar_info = tarfile.TarInfo("info.json")
tar_info.size = len(info_io.getvalue())
info_io.seek(0)
tf.addfile(tf_info, info_io)
tar.addfile(tar_info, info_io)
elif extension in ['zip']:
with zipfile.ZipFile(b, 'w') as zf:
for path, name in job.download_files(epoch):
Expand Down

0 comments on commit 2db4f57

Please sign in to comment.