summaryrefslogtreecommitdiff
path: root/src/leap/soledad/server
diff options
context:
space:
mode:
authorVictor Shyba <victor1984@riseup.net>2017-07-20 02:19:05 -0300
committerdrebs <drebs@leap.se>2017-07-21 10:58:48 -0300
commit76cbf4cbf0876e06d1d8e2839b63dffc13c271dd (patch)
tree499fa62999a08dd3c12c030fd4066bfd7d40cbbf /src/leap/soledad/server
parent792cb07327ca87137b4fc233c0c62a78c2ef2290 (diff)
[refactor] fixes from review
Improve test naming, creates a "count" method and filter flags files properly.
Diffstat (limited to 'src/leap/soledad/server')
-rw-r--r--src/leap/soledad/server/_blobs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/leap/soledad/server/_blobs.py b/src/leap/soledad/server/_blobs.py
index 6f298ba7..85983bd1 100644
--- a/src/leap/soledad/server/_blobs.py
+++ b/src/leap/soledad/server/_blobs.py
@@ -145,7 +145,7 @@ class FilesystemBlobsBackend(object):
base_path = self._get_path(user, custom_preffix=namespace)
count = 0
for _, _, filenames in os.walk(base_path):
- count += len(filenames)
+ count += len(filter(lambda i: not i.endswith('.flags'), filenames))
return json.dumps({"count": count})
def list_blobs(self, user, request, namespace='', order_by=None,