@@ -115,17 +115,17 @@ func runDelete(cmd *cobra.Command, args []string) {
115
115
}
116
116
delLabel := fmt .Sprintf ("%s=%s" , oci .CreatedByLabelKey , "true" )
117
117
errs := oci .DeleteAllContainersByLabel (oci .Docker , delLabel )
118
- if errs != nil && len (errs ) > 0 { // it will error if there is no container to delete
118
+ if len (errs ) > 0 { // it will error if there is no container to delete
119
119
glog .Infof ("error delete containers by label %q (might be okay): %+v" , delLabel , err )
120
120
}
121
121
122
122
errs = oci .DeleteAllVolumesByLabel (oci .Docker , delLabel )
123
- if errs != nil && len (errs ) > 0 { // it will not error if there is nothing to delete
123
+ if len (errs ) > 0 { // it will not error if there is nothing to delete
124
124
glog .Warningf ("error delete volumes by label %q (might be okay): %+v" , delLabel , errs )
125
125
}
126
126
127
127
errs = oci .PruneAllVolumesByLabel (oci .Docker , delLabel )
128
- if errs != nil && len (errs ) > 0 { // it will not error if there is nothing to delete
128
+ if len (errs ) > 0 { // it will not error if there is nothing to delete
129
129
glog .Warningf ("error pruning volumes by label %q (might be okay): %+v" , delLabel , errs )
130
130
}
131
131
@@ -194,7 +194,7 @@ func deleteProfile(profile *pkg_config.Profile) error {
194
194
delLabel := fmt .Sprintf ("%s=%s" , oci .ProfileLabelKey , profile .Name )
195
195
errs := oci .DeleteAllContainersByLabel (oci .Docker , delLabel )
196
196
if errs != nil { // it will error if there is no container to delete
197
- glog .Infof ("error deleting containers (might be okay):\n %v" , profile .Name , errs )
197
+ glog .Infof ("error deleting containers for %s (might be okay):\n %v" , profile .Name , errs )
198
198
}
199
199
errs = oci .DeleteAllVolumesByLabel (oci .Docker , delLabel )
200
200
if errs != nil { // it will not error if there is nothing to delete
@@ -203,7 +203,7 @@ func deleteProfile(profile *pkg_config.Profile) error {
203
203
204
204
errs = oci .PruneAllVolumesByLabel (oci .Docker , delLabel )
205
205
if errs != nil && len (errs ) > 0 { // it will not error if there is nothing to delete
206
- glog .Warningf ("error pruning volume (might be okay):\n %v" , delLabel , errs )
206
+ glog .Warningf ("error pruning volume (might be okay):\n %v" , errs )
207
207
}
208
208
209
209
api , err := machine .NewAPIClient ()
0 commit comments