Commit 987af712 authored by Anders Blomdell's avatar Anders Blomdell
Browse files

Cleanup make_room code

parent 2ebd4f49
......@@ -123,10 +123,15 @@ class Backup:
free = stat.f_frsize * stat.f_bavail
need = size + stat.f_frsize
return (free, need)
do_log = False
while True:
free,need = get_free_need(size)
if do_log:
self.log.MESSAGE("After, free=%d, need=%d", (free, need))
pass
if free > need:
break
do_log = True
self.log.MESSAGE("Need to free:",
need - free, (need, free), self.trash_root)
oldest = sorted(os.listdir(self.trash_root))[0]
......@@ -140,7 +145,6 @@ 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