* fix: try to report package size only if it's known (careful next time boyz!)
This commit is contained in:
+5
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user