Commit ee429ef5 by Kálmán Viktor

Merge branch 'file-stats-fix' into 'master'

Exclude directories from disk list



See merge request !15
parents 8eb937d5 aafde1f2
......@@ -92,7 +92,8 @@ def get_storage_stat(path):
def get_file_statistics(datastore):
disks = [Disk.get(datastore, name).get_desc()
for name in listdir(datastore)
if not name.endswith((".dump", "trash"))]
if not name.endswith(".dump") and
not path.isdir(path.join(datastore, name))]
dumps = [{'name': name,
'size': path.getsize(path.join(datastore, name))}
for name in listdir(datastore) if name.endswith(".dump")]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment