Merge pull request #2307 from choury/patch-1

Add missing error handler in machine info
This commit is contained in:
David Ashpole 2019-09-05 10:37:40 -07:00 committed by GitHub
commit f5e7ddf27a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,6 +100,9 @@ func Info(sysFs sysfs.SysFs, fsInfo fs.FsInfo, inHostNamespace bool) (*info.Mach
}
cpuinfo, err := ioutil.ReadFile(filepath.Join(rootFs, "/proc/cpuinfo"))
if err != nil {
return nil, err
}
clockSpeed, err := GetClockSpeed(cpuinfo)
if err != nil {
return nil, err