Revision a4148a73

b/snf-cyclades-gtools/synnefo/ganeti/eventd.py
87 87
    if status == constants.JOB_STATUS_RUNNING:
88 88
        return op.exec_timestamp
89 89
    if status in constants.JOBS_FINALIZED:
90
        # success, canceled, error
91
        return op.end_timestamp
90
        if op.end_timestamp:
91
            return op.end_timestamp
92
        else:
93
            # Error opcodes do not always have end timestamp
94
            return job.end_timestamp
92 95

  
93 96
    raise InvalidBackendStatus(status, job)
94 97

  

Also available in: Unified diff