Commit aafde1f2 by Kálmán Viktor

exclude directories from disk list

parent 950a98e3
......@@ -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