From 8a6c40b4dc9fdae6bfa02ba9327ce34d77661d6d Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Mon, 4 Jul 2022 13:25:19 +0530 Subject: [PATCH] Rename label --- src/common_backend.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common_backend.py b/src/common_backend.py index 0c60fc53..dab14a43 100644 --- a/src/common_backend.py +++ b/src/common_backend.py @@ -10,31 +10,31 @@ class AddressGenerator: @staticmethod def start_address_generation( - entered_label, streamNumberForAddress=1, eighteenByteRipe=False, + label, streamNumberForAddress=1, eighteenByteRipe=False, nonceTrialsPerByte=1000, payloadLengthExtraBytes=1000 ): """"Return True if the label is unique""" labels = [BMConfigParser().get(obj, 'label') for obj in BMConfigParser().addresses()] - if entered_label and entered_label not in labels: + if label and label not in labels: queues.addressGeneratorQueue.put(( - 'createRandomAddress', 4, streamNumberForAddress, entered_label, 1, + 'createRandomAddress', 4, streamNumberForAddress, label, 1, "", eighteenByteRipe, nonceTrialsPerByte, payloadLengthExtraBytes)) return True return False @staticmethod - def address_validation(instance, entered_label): + def address_validation(instance, label): """Checking address validation while creating""" labels = [BMConfigParser().get(obj, 'label') for obj in BMConfigParser().addresses()] - if entered_label in labels: + if label in labels: instance.error = True instance.helper_text = 'it is already exist you'\ ' can try this Ex. ( {0}_1, {0}_2 )'.format( - entered_label) - elif entered_label: + label) + elif label: instance.error = False else: instance.error = False