Displaying the details from the message

This commit is contained in:
Paul Edwards 2020-04-06 17:53:20 +01:00
Родитель d639747036
Коммит 989f0f238c
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -406,6 +406,13 @@ def do_build(args):
print(f" Message : {error_message[0]}") print(f" Message : {error_message[0]}")
for line in error_message[1:]: for line in error_message[1:]:
print(f" {line}") print(f" {line}")
if "details" in props["statusMessage"]["error"]:
details_code = props["statusMessage"]["error"]["details"].get("code", "")
details_message = textwrap.TextWrapper(width=60).wrap(text=props["statusMessage"]["error"]["details"].get("message", ""))
print(f" Details : {details_code}")
for line in details_message:
print(f" {line}")
sys.exit(1) sys.exit(1)
log.info("building host lists") log.info("building host lists")