@@ -573,22 +573,22 @@ def clean(self):
573573 subprocess .call (["rm" ,"-rf" ,"build" ])
574574 return self
575575
576- def find_exit_trigger (self , line ):
576+ def find_exit_status (self , line ):
577577
578578 # Kernel reports service exit status
579579 if (line .startswith (" [ Kernel ] service exited with status" ) or
580580 line .startswith (" [ main ] returned with status" )):
581581
582582 self ._exit_status = int (line .split (" " )[- 1 ].rstrip ())
583583 self ._exit_msg = "Service exited with status " + str (self ._exit_status )
584- return True
584+ return self . _exit_status
585585
586586 # Special case for end-of-transmission, e.g. on panic
587587 if line == EOT :
588588 self ._exit_status = exit_codes ["VM_EOT" ]
589- return True
589+ return self . _exit_status
590590
591- return False
591+ return None
592592
593593
594594 def trigger_event (self , line ):
@@ -642,7 +642,7 @@ def boot(self, timeout = 60, multiboot = True, kernel_args = "booted with vmrunn
642642 print color .WARNING ("Exception thrown while waiting for vm output" )
643643 break
644644
645- if line and not self .find_exit_trigger (line ):
645+ if line and self .find_exit_status (line ) == None :
646646 print color .VM (line .rstrip ())
647647 self .trigger_event (line )
648648
@@ -673,7 +673,7 @@ def boot(self, timeout = 60, multiboot = True, kernel_args = "booted with vmrunn
673673 lines = data .split ("\n " )
674674 for line in lines :
675675 print color .VM (line )
676- self .find_exit_trigger (line )
676+ self .find_exit_status (line )
677677 # Note: keep going. Might find panic after service exit
678678
679679 except Exception as e :
0 commit comments