From bf6adfb78217ec5456f053711c6c8eddce3af62a Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Mon, 15 Apr 2019 10:19:03 +0200 Subject: [PATCH] TTM: Fix conversion of QAResult to string --- ttm/manager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ttm/manager.py b/ttm/manager.py index 66b26128..d8bc776b 100644 --- a/ttm/manager.py +++ b/ttm/manager.py @@ -15,7 +15,7 @@ import ToolBase import logging import re import yaml -from enum import Enum +from enum import IntEnum from xml.etree import cElementTree as ET from osclib.stagingapi import StagingAPI try: @@ -29,15 +29,15 @@ from ttm.totest import ToTest class NotFoundException(Exception): pass -class QAResult(Enum): +class QAResult(IntEnum): inprogress = 1 failed = 2 passed = 3 def __str__(self): - if self.value == QAResult.inprogress: + if self == QAResult.inprogress: return 'inprogress' - elif self.value == QAResult.failed: + elif self == QAResult.failed: return 'failed' else: return 'passed'