From 41683a11b08d93c712b5683f87cdc1fca0ee354d Mon Sep 17 00:00:00 2001 From: Niels Thykier Date: Thu, 31 Dec 2015 11:14:34 +0000 Subject: [PATCH] dominate: Do not attempt delete rows during dry-run Without the proper permissions, this will fail even if the transaction would always be rolled back later. --- dak/dominate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dak/dominate.py b/dak/dominate.py index 600d1127..52f1b172 100755 --- a/dak/dominate.py +++ b/dak/dominate.py @@ -84,12 +84,13 @@ def obsoleteAllAssociations(suite, session): return fetch('old_and_unreferenced', query, { 'suite': suite }, session) def deleteAssociations(table, idList, session): + global Options query = """ DELETE FROM %s WHERE id IN :idList """ % table - if not idList: + if not idList or Options['No-Action']: return params = {'idList': tuple(idList)} session.execute(query, params) -- 2.39.2