summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2017-03-16 19:11:18 +0100
committerdrebs <drebs@leap.se>2017-04-04 18:27:34 +0200
commit4909a366ed6b81d16af6898167ac342c6b65916f (patch)
treef166f6daf7684d5559a941f6e3dd60228daa8b46 /server
parentaad05fbe35650643e9a3e90f0055f66a4a72e082 (diff)
[bug] return 0 quota if user's blob dir doesn't exist
Diffstat (limited to 'server')
-rw-r--r--server/src/leap/soledad/server/_blobs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/leap/soledad/server/_blobs.py b/server/src/leap/soledad/server/_blobs.py
index 956df642..729f213d 100644
--- a/server/src/leap/soledad/server/_blobs.py
+++ b/server/src/leap/soledad/server/_blobs.py
@@ -151,7 +151,8 @@ class FilesystemBlobsBackend(object):
raise NotImplementedError
def _get_disk_usage(self, start_path):
- assert os.path.isdir(start_path)
+ if not os.path.isdir(start_path):
+ return 0
cmd = 'du -c %s | tail -n 1' % start_path
size = commands.getoutput(cmd).split()[0]
return int(size)