[yast-commit] <rest-service> master : subprogress: use -1 instead of nil as the default value
ref: refs/heads/master commit e2f8459caadcbc072ce3c611579f9711f5a9b027 Author: Ladislav Slezak <lslezak@novell.com> Date: Wed Dec 16 15:21:35 2009 +0100 subprogress: use -1 instead of nil as the default value nil.to_i => 0, after deserialization from XML it was not possible to distinguish between 0% and no subprogress --- webservice/lib/background_status.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/webservice/lib/background_status.rb b/webservice/lib/background_status.rb index b7f7127..03ea420 100644 --- a/webservice/lib/background_status.rb +++ b/webservice/lib/background_status.rb @@ -6,7 +6,7 @@ class BackgroundStatus :progress, :subprogress - def initialize(stat = 'unknown', progress = 0, subprogress = nil, &block) + def initialize(stat = 'unknown', progress = 0, subprogress = -1, &block) @status = stat @progress = progress @subprogress = subprogress -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
Ladislav Slezak