From e7b029c99384b832f3bce01143909f8c11120c48 Mon Sep 17 00:00:00 2001 From: Charlton Austin Date: Mon, 28 Nov 2016 11:37:26 -0500 Subject: [PATCH] Fixing how we encode some JSON. --- storage/swift.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/storage/swift.py b/storage/swift.py index b98b3db89..6017a18b4 100644 --- a/storage/swift.py +++ b/storage/swift.py @@ -7,6 +7,7 @@ import copy import hmac import string import logging +import json from _pyio import BufferedReader from uuid import uuid4 @@ -320,11 +321,11 @@ class SwiftStorage(BaseStorage): continue # Queue the chunk to be deleted, as it is empty and therefore unused. - self._context.chunk_cleanup_queue.put(['segment/%s/%s' % (self._context.location, uuid)], { + self._context.chunk_cleanup_queue.put(['segment/%s/%s' % (self._context.location, uuid)], json.dumps({ 'location': self._context.location, 'uuid': uuid, 'path': segment.path, - }, available_after=_CHUNK_CLEANUP_DELAY) + }), available_after=_CHUNK_CLEANUP_DELAY) # Finally, we write an empty file at the proper location with a X-Object-Manifest # header pointing to the prefix for the segments.