mirror of
https://github.com/containers/podman.git
synced 2025-06-30 07:26:39 +08:00
Fix further style issues
Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #268 Approved by: rhatdan
This commit is contained in:
@ -920,13 +920,11 @@ func (s *SQLState) RemovePodContainers(pod *Pod) (err error) {
|
|||||||
// Remove state first, as it needs the subquery on containers
|
// Remove state first, as it needs the subquery on containers
|
||||||
// Don't bother checking if we actually removed anything, we just want to
|
// Don't bother checking if we actually removed anything, we just want to
|
||||||
// empty the pod
|
// empty the pod
|
||||||
_, err = tx.Exec(removeCtrState, pod.ID())
|
if _, err := tx.Exec(removeCtrState, pod.ID()); err != nil {
|
||||||
if err != nil {
|
|
||||||
return errors.Wrapf(err, "error removing pod %s containers from state table", pod.ID())
|
return errors.Wrapf(err, "error removing pod %s containers from state table", pod.ID())
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = tx.Exec(removeCtr, pod.ID())
|
if _, err := tx.Exec(removeCtr, pod.ID()); err != nil {
|
||||||
if err != nil {
|
|
||||||
return errors.Wrapf(err, "error removing pod %s containers from containers table", pod.ID())
|
return errors.Wrapf(err, "error removing pod %s containers from containers table", pod.ID())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -672,8 +672,7 @@ func (s *SQLState) ctrFromScannable(row scannable) (*Container, error) {
|
|||||||
// Retrieve the ports from disk
|
// Retrieve the ports from disk
|
||||||
// They may not exist - if they don't, this container just doesn't have ports
|
// They may not exist - if they don't, this container just doesn't have ports
|
||||||
portPath := getPortsPath(s.specsDir, id)
|
portPath := getPortsPath(s.specsDir, id)
|
||||||
_, err = os.Stat(portPath)
|
if _, err = os.Stat(portPath); err != nil {
|
||||||
if err != nil {
|
|
||||||
if !os.IsNotExist(err) {
|
if !os.IsNotExist(err) {
|
||||||
return nil, errors.Wrapf(err, "error stating container %s JSON ports", id)
|
return nil, errors.Wrapf(err, "error stating container %s JSON ports", id)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user