diff options
Diffstat (limited to 'pkg/machine')
-rw-r--r-- | pkg/machine/fedora.go | 5 | ||||
-rw-r--r-- | pkg/machine/qemu/machine.go | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/pkg/machine/fedora.go b/pkg/machine/fedora.go index b26921b52..bcf694def 100644 --- a/pkg/machine/fedora.go +++ b/pkg/machine/fedora.go @@ -59,7 +59,10 @@ func (f FedoraDownload) Get() *Download { func (f FedoraDownload) HasUsableCache() (bool, error) { info, err := os.Stat(f.LocalPath) if err != nil { - return false, nil + if os.IsNotExist(err) { + return false, nil + } + return false, err } return info.Size() == f.Size, nil } diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go index 46f838f8b..ddb49124d 100644 --- a/pkg/machine/qemu/machine.go +++ b/pkg/machine/qemu/machine.go @@ -626,7 +626,8 @@ func (v *MachineVM) Stop(name string, _ machine.StopOptions) error { } if err := qmpMonitor.Disconnect(); err != nil { - return nil + // FIXME: this error should probably be returned + return nil // nolint: nilerr } disconnected = true @@ -755,7 +756,8 @@ func (v *MachineVM) isRunning() (bool, error) { // Check if we can dial it monitor, err := qmp.NewSocketMonitor(v.QMPMonitor.Network, v.QMPMonitor.Address, v.QMPMonitor.Timeout) if err != nil { - return false, nil + // FIXME: this error should probably be returned + return false, nil // nolint: nilerr } if err := monitor.Connect(); err != nil { return false, err |