Skip to content

Commit b45ab06

Browse files
committed
Implement review comment to error with unknown vendor
1 parent 816a2a8 commit b45ab06

File tree

1 file changed

+3
-1
lines changed
  • ansible_base/lib/utils

1 file changed

+3
-1
lines changed

ansible_base/lib/utils/db.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,7 @@ def advisory_lock(*args, lock_session_timeout_milliseconds=0, **kwargs):
135135
with connection.cursor() as cur:
136136
cur.execute("SET idle_in_transaction_session_timeout = %s", (idle_in_transaction_session_timeout,))
137137
cur.execute("SET idle_session_timeout = %s", (idle_session_timeout,))
138-
else:
138+
elif connection.vendor == "sqlite":
139139
yield True
140+
else:
141+
raise RuntimeError(f'Advisory lock not implemented for database type {connection.vendor}')

0 commit comments

Comments
 (0)