From af64c50fe65e7f7b6ce68bc8a8ea3be686fb7703 Mon Sep 17 00:00:00 2001 From: Radu Ioan Fericean Date: Thu, 22 Aug 2013 17:08:40 +0300 Subject: [PATCH] hoping for a minute bucjet fix --- engine/simple_serializer.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engine/simple_serializer.go b/engine/simple_serializer.go index 5ebe16ae5..ff11ec3a6 100644 --- a/engine/simple_serializer.go +++ b/engine/simple_serializer.go @@ -581,8 +581,11 @@ func (mb *MinuteBucket) Store() (result string, err error) { func (mb *MinuteBucket) Restore(input string) error { input = strings.TrimSpace(input) + if len(input) == 0 { + return nil + } elements := strings.Split(input, ";") - if len(input) > 0 && len(elements) != 5 { + if len(elements) != 5 { return notEnoughElements("MinuteBucket", input) } mb.Seconds, _ = strconv.ParseFloat(elements[0], 64)