Move DL0 raises outside if existing conditionals to calm down pylint

This pull should not remove code, therefore it is needed to add addtional
conditionals to calm down pylint beacuse of unreachable code.

See: https://pagure.io/freeipa/issue/7669
Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
Thomas Woerner
2018-08-07 15:44:56 +02:00
committed by Christian Heimes
parent 0eb140ea73
commit b99dc46a9c
2 changed files with 9 additions and 6 deletions

View File

@@ -640,12 +640,13 @@ class ServerReplicaInstall(ServerReplicaInstallInterface):
@step()
def main(self):
if self.replica_file is None:
replica_promote_check(self)
else:
if self.replica_file is not None:
# Domain level 0 is not supported anymore
raise RuntimeError(
"Domain level 0 is not supported anymore.")
if self.replica_file is None:
replica_promote_check(self)
else:
replica_install_check(self)
yield
replica_install(self)