[yast-commit] <rest-service> backgroud_patches_bnc550934 : use -1 instead of nil for unknown (sub)progress
ref: refs/heads/backgroud_patches_bnc550934 commit 5ab12b89c298ef3d3d9d6fceaea6dae1c6694fdf Author: Ladislav Slezak <lslezak@novell.com> Date: Thu Dec 17 09:40:13 2009 +0100 use -1 instead of nil for unknown (sub)progress --- plugins/patches/app/models/resolvable.rb | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/patches/app/models/resolvable.rb b/plugins/patches/app/models/resolvable.rb index 94e6e10..dd4de07 100644 --- a/plugins/patches/app/models/resolvable.rb +++ b/plugins/patches/app/models/resolvable.rb @@ -138,9 +138,9 @@ public proxy.on_signal("ProgressChanged") do |p1, p2, p3, p4| Rails.logger.debug "PackageKit progress: ProgressChanged: #{p1}%" - bg_stat.progress = p1 - # 101% means no subprogress available - bg_stat.subprogress = p2 < 101 ? p2 : nil + # 101% means no progress/subprogress available + bg_stat.progress = p1 < 101 ? p1 : -1 + bg_stat.subprogress = p2 < 101 ? p2 : -1 end end -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
Ladislav Slezak