Merge "Ensure all tox is passing"

This commit is contained in:
Zuul 2023-12-20 15:48:40 +00:00 committed by Gerrit Code Review
commit 40ca47d03d
3 changed files with 6 additions and 3 deletions

View File

@ -96,14 +96,17 @@ class StateValidationFailure(SoftwareError):
"""State Validation Failure""" """State Validation Failure"""
pass pass
class DeployDoNotExist(SoftwareError): class DeployDoNotExist(SoftwareError):
"""Deploy Do Not Exist""" """Deploy Do Not Exist"""
pass pass
class DeployAlreadyExist(SoftwareError): class DeployAlreadyExist(SoftwareError):
"""Deploy Already Exist""" """Deploy Already Exist"""
pass pass
class ReleaseVersionDoNotExist(SoftwareError): class ReleaseVersionDoNotExist(SoftwareError):
"""Release Version Do Not Exist""" """Release Version Do Not Exist"""
pass pass

View File

@ -6,7 +6,8 @@ SPDX-License-Identifier: Apache-2.0
""" """
import logging import logging
from abc import ABC, abstractmethod from abc import ABC
from abc import abstractmethod
from enum import Enum from enum import Enum
from typing import List from typing import List
@ -227,7 +228,6 @@ class DeployHosts(ABC):
pass pass
class DeployHandler(Deploy): class DeployHandler(Deploy):
def __init__(self): def __init__(self):
super().__init__() super().__init__()

View File

@ -292,7 +292,7 @@ def check_state(state, states):
:param state: String value. :param state: String value.
:param states: An Enum object. :param states: An Enum object.
""" """
if not state in states.__members__: if state not in states.__members__:
msg = "State %s not in valid states: %s" % (state, list(states.__members__.keys())) msg = "State %s not in valid states: %s" % (state, list(states.__members__.keys()))
LOG.exception(msg) LOG.exception(msg)
raise StateValidationFailure(msg) raise StateValidationFailure(msg)