Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 9699 | Differences between
and this patch

Collapse All | Expand All

(-)./output.py (+10 lines)
Lines 37-39 Link Here
37
37
38
def red(text):
38
def red(text):
39
	return codes["red"]+text+codes["reset"]
39
	return codes["red"]+text+codes["reset"]
40
41
def humansize(size):
42
	"Converts size into a string with a human readable size. Ie converts 1024 to 1KB etc."
43
	sizes=["B","KB","MB","GB"]
44
	i = 0;
45
	fsize=float(size)
46
	while(fsize > 1024):
47
		i+=1
48
		fsize /= 1024
49
	return ("%.1f" % fsize) + sizes[i]

Return to bug 9699