Skip to content

Commit

Permalink
o/snapstate: remove unneeded call to Get
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewphelpsj committed Dec 16, 2024
1 parent caed45c commit f19dad2
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions overlord/snapstate/snapstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -1604,12 +1604,6 @@ func downloadTasks(
revOpts.ValidationSets = snapasserts.NewValidationSets()
}

var snapst SnapState
err := Get(st, name, &snapst)
if err != nil && !errors.Is(err, state.ErrNoState) {
return nil, nil, err
}

if err := snap.ValidateInstanceName(name); err != nil {
return nil, nil, fmt.Errorf("invalid instance name: %v", err)
}
Expand Down

0 comments on commit f19dad2

Please sign in to comment.