From fc5a9bb5758349eebe1e6b581104922cf63bbd0c Mon Sep 17 00:00:00 2001 From: Katleho Madisa <katleho.madisa47@gmail.com> Date: Tue, 22 Sep 2020 12:18:43 +0000 Subject: [PATCH] SAR-149 Updated docstrings. --- src/ska/logging/transactions.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ska/logging/transactions.py b/src/ska/logging/transactions.py index 89a3959..43792de 100644 --- a/src/ska/logging/transactions.py +++ b/src/ska/logging/transactions.py @@ -73,6 +73,9 @@ class Transaction: If there is a transaction ID in `params` and `transaction_id` is also passed in then the passed in `transaction_id` will take precedence. + However, if both transaction IDs provided in `params` and `transaction_id` are deemed + invalid (not a string or an empty string), then a new transaction ID will be generated. + By default the key `transaction_id` will be used to get a transaction ID out of `params`. If a different key is required then `transaction_id_key` can be specified. @@ -96,12 +99,11 @@ class Transaction: Raises ------ TransactionParamsError - If the `params` passed in is not valid. + If the `params` passed is not valid. """ if not isinstance(params, Mapping): raise TransactionParamsError("params must be dict-like (Mapping)") - if logger: self.logger = logger else: -- GitLab