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