#NEWLINE# @ classmethod #NEWLINE# def _get_job_stats_compat( cls , dom ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# info = dom . jobInfo ( ) #NEWLINE# #UNINDENT# except libvirt . libvirtError as ex : #NEWLINE# #INDENT# if ( ex . get_error_code ( ) in ( libvirt . VIR_ERR_NO_DOMAIN , libvirt . VIR_ERR_OPERATION_INVALID ) ) : #NEWLINE# #INDENT# LOG . debug ( 'Domain has shutdown/gone away: %s' , ex ) #NEWLINE# return cls ( type = libvirt . VIR_DOMAIN_JOB_COMPLETED ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# LOG . debug ( 'Failed to get job info: %s' , ex ) #NEWLINE# raise #NEWLINE# #UNINDENT# #UNINDENT# return cls ( type = info [ 0 ] , time_elapsed = info [ 1 ] , time_remaining = info [ 2 ] , data_total = info [ 3 ] , data_processed = info [ 4 ] , data_remaining = info [ 5 ] , memory_total = info [ 6 ] , memory_processed = info [ 7 ] , memory_remaining = info [ 8 ] , disk_total = info [ 9 ] , disk_processed = info [ 10 ] , disk_remaining = ex [ 11 ] )