Fix CI: Raise specific exception.
Do comparison with !=.
This commit is contained in:
parent
0a85790410
commit
c530628192
1 changed files with 4 additions and 4 deletions
|
@ -23,7 +23,7 @@ class ReleaseMixin(DevopsBuild):
|
|||
def __init__(self, project: Project, config: Optional[dict] = None, release_config: Optional[ReleaseConfig] = None):
|
||||
if not release_config:
|
||||
if not config:
|
||||
raise Exception("Release parameters could not be set.")
|
||||
raise ValueError("Release parameters could not be set.")
|
||||
super().__init__(project, config=config)
|
||||
release_mixin_config = config['ReleaseMixin']
|
||||
release_config = ReleaseConfig(
|
||||
|
@ -38,7 +38,7 @@ class ReleaseMixin(DevopsBuild):
|
|||
git_api = GitApi()
|
||||
environment_api = EnvironmentApi()
|
||||
env_key = EnvironmentKeys.DDADEVOPS_RELEASE_TYPE.name
|
||||
environment_val_set = environment_api.get(env_key) is not "" and environment_api.get(env_key) is not None
|
||||
environment_val_set = environment_api.get(env_key) != "" and environment_api.get(env_key) is not None
|
||||
|
||||
if environment_val_set:
|
||||
release_type_repo = ReleaseTypeRepository.from_environment(environment_api)
|
||||
|
|
Loading…
Reference in a new issue