cmd/revid-cli: catching error in conversion of mp

This commit is contained in:
saxon 2019-02-05 10:45:15 +10:30
parent 4dcbd90449
commit ea8572a777
1 changed files with 4 additions and 1 deletions

View File

@ -337,7 +337,10 @@ func run(cfg revid.Config) error {
ns.SetMode(paused, &vs)
}
sleep:
sleepTime, _ := strconv.Atoi(ns.Param("mp"))
sleepTime, err := strconv.Atoi(ns.Param("mp"))
if err != nil {
return err
}
time.Sleep(time.Duration(sleepTime) * time.Second)
}
}