diff --git a/src/allmydata/web/storage.py b/src/allmydata/web/storage.py index cf3264dac..51624a409 100644 --- a/src/allmydata/web/storage.py +++ b/src/allmydata/web/storage.py @@ -1,3 +1,4 @@ +from future.utils import PY2 import time, json from twisted.python.filepath import FilePath @@ -317,4 +318,7 @@ class StorageStatus(MultiFormatResource): "lease-checker": self._storage.lease_checker.get_state(), "lease-checker-progress": self._storage.lease_checker.get_progress(), } - return json.dumps(d, indent=1) + "\n" + result = json.dumps(d, indent=1) + "\n" + if PY2: + result = result.decode("utf-8") + return result.encode("utf-8")