parent
ebfd9c1882
commit
4868625809
|
@ -289,8 +289,11 @@ def follow_console_log(config, vm, lines=10):
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
# Grab the next line set
|
# Grab the next line set
|
||||||
response = call_api(config, 'get', '/vm/{vm}/console'.format(vm=vm), params=params)
|
try:
|
||||||
new_console_log = response.json()['data']
|
response = call_api(config, 'get', '/vm/{vm}/console'.format(vm=vm), params=params)
|
||||||
|
new_console_log = response.json()['data']
|
||||||
|
except:
|
||||||
|
break
|
||||||
# Split the new and old log strings into constitutent lines
|
# Split the new and old log strings into constitutent lines
|
||||||
old_console_loglines = console_log.split('\n')
|
old_console_loglines = console_log.split('\n')
|
||||||
new_console_loglines = new_console_log.split('\n')
|
new_console_loglines = new_console_log.split('\n')
|
||||||
|
|
Loading…
Reference in New Issue