diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/leap/soledad/server/_blobs.py | 3 | ||||
-rw-r--r-- | src/leap/soledad/server/interfaces.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/leap/soledad/server/_blobs.py b/src/leap/soledad/server/_blobs.py index f9166ce0..21becbf3 100644 --- a/src/leap/soledad/server/_blobs.py +++ b/src/leap/soledad/server/_blobs.py @@ -151,7 +151,8 @@ class FilesystemBlobsBackend(object): def get_blob_size(self, user, blob_id, namespace=''): blob_path = self._get_path(user, blob_id, namespace) - return os.stat(blob_path).st_size + size = os.stat(blob_path).st_size + return defer.succeed(size) def count(self, user, namespace=''): base_path = self._get_path(user, namespace=namespace) diff --git a/src/leap/soledad/server/interfaces.py b/src/leap/soledad/server/interfaces.py index f9257c9b..a7caf917 100644 --- a/src/leap/soledad/server/interfaces.py +++ b/src/leap/soledad/server/interfaces.py @@ -85,8 +85,8 @@ class IBlobsBackend(Interface): :param namespace: An optional namespace for the blob. :type namespace: str - :return: The size of the blob. - :rtype: int + :return: A deferred that fires with the size of the blob. + :rtype: twisted.internet.defer.Deferred """ def count(user, namespace=''): |