hoping for a minute bucjet fix

This commit is contained in:
Radu Ioan Fericean
2013-08-22 17:08:40 +03:00
parent 2448507578
commit af64c50fe6

View File

@@ -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)