Cleanup generic_scheduler

This commit is contained in:
Claire Li 2014-11-04 21:39:10 -08:00
parent 1dddcea2f0
commit 0e989afa66

View File

@ -103,12 +103,12 @@ func getMinHosts(list HostPriorityList) []string {
// EqualPriority is a prioritizer function that gives an equal weight of one to all nodes
func EqualPriority(pod api.Pod, podLister PodLister, minionLister MinionLister) (HostPriorityList, error) {
nodes, err := minionLister.List()
result := []HostPriority{}
if err != nil {
fmt.Errorf("failed to list nodes: %v", err)
return []HostPriority{}, err
}
result := []HostPriority{}
for _, minion := range nodes.Items {
result = append(result, HostPriority{
host: minion.Name,