Commit 10637988 authored by Kevin Di Lallo's avatar Kevin Di Lallo
Browse files

meepctl fix when no config file present

parent 3f484b26
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -357,11 +357,13 @@ func ConfigIsIpv4(host string) bool {
//  operation == "" returns the whole group
func GetTargets(group string, operation string) []string {
	targets := []string{}
	if RepoCfg != nil {
		for target := range RepoCfg.GetStringMapString(group) {
			if RepoCfg.GetBool(group+"."+target+"."+operation) || operation == "" {
				targets = append(targets, target)
			}
		}
		sort.Strings(targets)
	}
	return targets
}