don't panic if we don't have any snapshots when checking the age.

report from behrens@bytemine.net
release/release-0.2.0
parent 6a3a229fb2
commit f249629847

@ -29,6 +29,9 @@ func (x *SnapshotsAgeCommand) Execute(args []string) error {
if error != nil {
Unknown("Error retrieving snapshots")
}
if snapshot == nil {
Unknown("No snapshots found")
}
warningDuration := time.Duration(x.Warning) * time.Hour
criticalDuration := time.Duration(x.Critical) * time.Hour

Loading…
Cancel
Save