diff options
Diffstat (limited to 'src/leap/soledad/server/_blobs.py')
-rw-r--r-- | src/leap/soledad/server/_blobs.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/leap/soledad/server/_blobs.py b/src/leap/soledad/server/_blobs.py index f7db9218..790a9b51 100644 --- a/src/leap/soledad/server/_blobs.py +++ b/src/leap/soledad/server/_blobs.py @@ -121,7 +121,8 @@ class FilesystemBlobsBackend(object): defer.returnValue(None) logger.info('writing blob: %s - %s' % (user, blob_id)) fbp = FileBodyProducer(request.content) - yield fbp.startProducing(open(path, 'wb')) + with open(path, 'wb') as blobfile: + yield fbp.startProducing(blobfile) def delete_blob(self, user, blob_id, namespace=''): blob_path = self._get_path(user, blob_id, namespace) |