Commit 2ebd4f49 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Add logging after free done

parent c6216d40
......@@ -118,10 +118,13 @@ class Backup:
self.status.unchanged += 1
def make_room(self, size):
while True:
def get_free_need(size):
stat = os.statvfs(self.dst_root)
free = stat.f_frsize * stat.f_bavail
need = size + stat.f_frsize
return (free, need)
while True:
free,need = get_free_need(size)
if free > need:
break
self.log.MESSAGE("Need to free:",
......@@ -137,6 +140,7 @@ class Backup:
os.unlink(d)
pass
pass
self.log.MESSAGE("Free after", get_free_need(size))
pass
def add_parents(self, src):
......
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 to comment