Merge "Pass kwargs from execute to transaction()"

This commit is contained in:
Zuul 2019-03-01 16:02:16 +00:00 committed by Gerrit Code Review
commit 1da137d797
1 changed files with 3 additions and 3 deletions

View File

@ -31,13 +31,13 @@ class BaseCommand(api.Command):
self.api = api
self.result = None
def execute(self, check_error=False, log_errors=True):
def execute(self, check_error=False, log_errors=True, **kwargs):
try:
if self.READ_ONLY:
self.run_idl(None)
return self.result
with self.api.transaction(check_error, log_errors) as txn:
txn.add(self)
with self.api.transaction(check_error, log_errors, **kwargs) as t:
t.add(self)
return self.result
except Exception:
if log_errors: