diff options
author | Sebastian Luther <SebastianLuther@gmx.de> | 2010-09-20 12:50:23 +0200 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-20 08:11:38 -0700 |
commit | e1832018e84a75871c69e1d1c7779592014fa041 (patch) | |
tree | bd52f7ae4fd3d02c66d84ba57bce1fcf37c37dde /pym/_emerge/format_size.py | |
parent | 7f089f0d6b25d539d1ff16abc6bcc930a613e22a (diff) | |
download | portage-e1832018e84a75871c69e1d1c7779592014fa041.tar.gz portage-e1832018e84a75871c69e1d1c7779592014fa041.tar.bz2 portage-e1832018e84a75871c69e1d1c7779592014fa041.zip |
Move mergelist printing into resolver/output.py
Diffstat (limited to 'pym/_emerge/format_size.py')
-rw-r--r-- | pym/_emerge/format_size.py | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/pym/_emerge/format_size.py b/pym/_emerge/format_size.py deleted file mode 100644 index 4357b7654..000000000 --- a/pym/_emerge/format_size.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -import sys - -if sys.hexversion >= 0x3000000: - basestring = str - -# formats a size given in bytes nicely -def format_size(mysize): - if isinstance(mysize, basestring): - return mysize - if 0 != mysize % 1024: - # Always round up to the next kB so that it doesn't show 0 kB when - # some small file still needs to be fetched. - mysize += 1024 - mysize % 1024 - mystr=str(mysize//1024) - mycount=len(mystr) - while (mycount > 3): - mycount-=3 - mystr=mystr[:mycount]+","+mystr[mycount:] - return mystr+" kB" - |