Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Silva <sebastian@somosazucar.org>2013-09-28 13:11:18 (GMT)
committer Sebastian Silva <sebastian@somosazucar.org>2013-09-28 13:11:18 (GMT)
commitb6132c36a1baf5527cd7a67868450e915a57f225 (patch)
tree6d01865acad9485e8d719ebfa53ec5f6133530c2
parent086c7594a95646f52794ac3a085e47edef301415 (diff)
fix download of artifacts in Sugar
-rw-r--r--sugar_network_webui/app.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sugar_network_webui/app.py b/sugar_network_webui/app.py
index 95e2bb7..16e47f3 100644
--- a/sugar_network_webui/app.py
+++ b/sugar_network_webui/app.py
@@ -331,7 +331,8 @@ def artifact_copy(guid):
blob = artifact.get_blob('data')
document_path = get_documents_path()
with file(os.path.join(document_path, filename), 'w') as f:
- f.write(blob.read())
+ for chunk in blob:
+ f.write(chunk)
title = _('Artifact has been downloaded.')
body = _('Success!\n\n'
'File %(filename)s has been copied to your Documents folder.\n'