* fix: try to report package size only if it's known (careful next time boyz!)

This commit is contained in:
Eray Özkural
2006-03-23 01:28:56 +00:00
parent 6e1b75ab1e
commit e46d391783
+5 -4
View File
@@ -48,10 +48,11 @@ class Package:
# get current package name without version info (like tasma)
current_pkg = util.pure_package_name(url.filename())
package_size = get_package(current_pkg).packageSize
if package_size:
package_size, symbol = util.human_readable_size(package_size)
ctx.ui.warning(_("Package size: %.2f %s" % (package_size, symbol)))
if ctx.packagedb.has_package(current_pkg):
package_size = ctx.packagedb.get_package(current_pkg).packageSize
if package_size:
package_size, symbol = util.human_readable_size(package_size)
ctx.ui.warning(_("Package size: %.2f %s" % (package_size, symbol)))
# if package is installed (which means we are upgrading it),
# calculate needed info