Issue-ID: INT-1834
Signed-off-by: mrichomme <morgan.richomme@orange.com>
Change-Id: I032ad1234036c5671722456995d1059a8a493cfb
# TODO: Is there really no better way, to check
# execution exit code in python k8s API client?
- code = (
- 0
- if error["status"] == "Success"
- else -2
- if error["reason"] != "NonZeroExitCode"
- else int(error["details"]["causes"][0]["message"])
- )
+ code=-2
+ try:
+ code = (
+ 0
+ if error["status"] == "Success"
+ else -2
+ if error["reason"] != "NonZeroExitCode"
+ else int(error["details"]["causes"][0]["message"])
+ )
+ except:
+ pass
return {
"stdout": stdout,