* fix: try to report package size only if it's known (careful next time boyz!)
This commit is contained in:
+2
-1
@@ -48,7 +48,8 @@ class Package:
|
|||||||
# get current package name without version info (like tasma)
|
# get current package name without version info (like tasma)
|
||||||
current_pkg = util.pure_package_name(url.filename())
|
current_pkg = util.pure_package_name(url.filename())
|
||||||
|
|
||||||
package_size = get_package(current_pkg).packageSize
|
if ctx.packagedb.has_package(current_pkg):
|
||||||
|
package_size = ctx.packagedb.get_package(current_pkg).packageSize
|
||||||
if package_size:
|
if package_size:
|
||||||
package_size, symbol = util.human_readable_size(package_size)
|
package_size, symbol = util.human_readable_size(package_size)
|
||||||
ctx.ui.warning(_("Package size: %.2f %s" % (package_size, symbol)))
|
ctx.ui.warning(_("Package size: %.2f %s" % (package_size, symbol)))
|
||||||
|
|||||||
Reference in New Issue
Block a user