Replaced the call to os.Open and ReadNetworkMap to just a single call to ReadNetmapConfig in both the Workstation9 and Player5 VMware drivers.

pull/6096/head
Ali Rizvi-Santiago 8 years ago
parent f2fc064037
commit 646523c5f4

@ -201,14 +201,9 @@ func (d *Player5Driver) Verify() error {
if _, err := os.Stat(pathNetmap); err != nil {
return nil, fmt.Errorf("Could not find netmap conf file: %s", pathNetmap)
}
log.Printf("Located networkmapper configuration file using Player: %s", pathNetmap)
fd, err := os.Open(pathNetmap)
if err != nil {
return nil, err
}
defer fd.Close()
return ReadNetworkMap(fd)
return ReadNetmapConfig(pathNetmap)
}
return nil
}

@ -162,14 +162,9 @@ func (d *Workstation9Driver) Verify() error {
if _, err := os.Stat(pathNetmap); err != nil {
return nil, fmt.Errorf("Could not find netmap conf file: %s", pathNetmap)
}
log.Printf("Located networkmapper configuration file using Workstation: %s", pathNetmap)
fd, err := os.Open(pathNetmap)
if err != nil {
return nil, err
}
defer fd.Close()
return ReadNetworkMap(fd)
return ReadNetmapConfig(pathNetmap)
}
return nil
}

Loading…
Cancel
Save