Because the except KubeError was first, and KubeDevCommandError and KubeDevError are both KubeError's, we were never using those except blocks. By moving this later, we use the proper KubeDevCommandError handler which correctly formats stdout (as it's being passed in raw, rather than through the __str__ handler for KubeError.
Because the
except KubeError
was first, andKubeDevCommandError
andKubeDevError
are bothKubeError
's, we were never using thoseexcept
blocks. By moving this later, we use the properKubeDevCommandError
handler which correctly formatsstdout
(as it's being passed in raw, rather than through the__str__
handler forKubeError
.