Second answer
This commit is contained in:
1 parent
b5172e0f22
commit
d621db89ad
1 file changed
+12
-1
@@ -86,5 +86,16 @@ for i in dirs.values():
|
|||||||
if dirsize <= 100000:
|
if dirsize <= 100000:
|
||||||
tot += dirsize
|
tot += dirsize
|
||||||
|
|
||||||
|
|
||||||
print(tot)
|
print(tot)
|
||||||
|
|
||||||
|
usedspace = dirs['/'].size()
|
||||||
|
freespace = 70000000 - usedspace
|
||||||
|
candidates = []
|
||||||
|
|
||||||
|
for i in dirs.values():
|
||||||
|
dirsize = i.size()
|
||||||
|
if (freespace + dirsize) > 30000000:
|
||||||
|
candidates.append(dirsize)
|
||||||
|
|
||||||
|
candidates.sort()
|
||||||
|
print(candidates[0])
|
||||||
Reference in new issue
Block a user