Replace assert False by raising an error (#86686)

This commit is contained in:
Franck Nijhof
2023-01-26 16:51:43 +01:00
committed by GitHub
parent adeaf746ec
commit d4955a3d87
5 changed files with 11 additions and 8 deletions

View File

@@ -172,7 +172,8 @@ def execute(
raise
time.sleep(QUERY_RETRY_WAIT)
assert False # unreachable # pragma: no cover
# Unreachable
raise RuntimeError # pragma: no cover
def execute_stmt_lambda_element(
@@ -206,7 +207,8 @@ def execute_stmt_lambda_element(
raise
time.sleep(QUERY_RETRY_WAIT)
assert False # unreachable # pragma: no cover
# Unreachable
raise RuntimeError # pragma: no cover
def validate_or_move_away_sqlite_database(dburl: str) -> bool: