Handle bad response to logs

This commit is contained in:
Joshua Boniface 2020-01-05 17:07:39 -05:00
parent cfb5862cf0
commit 33709828b1
1 changed files with 3 additions and 0 deletions

View File

@ -323,6 +323,9 @@ def view_console_log(config, vm, lines=100):
debug_output(config, request_uri, response)
if response.status_code != 200:
return False, response.json()['message']
console_log = response.json()['data']
# Shrink the log buffer to length lines