From 5cfaa9b2fad99e75db4773712cce7a783861c422 Mon Sep 17 00:00:00 2001 From: coolguy-cell Date: Sat, 30 May 2020 18:26:54 +0530 Subject: [PATCH] fixed CQ for address_dialog python file --- src/bitmessageqt/address_dialogs.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/bitmessageqt/address_dialogs.py b/src/bitmessageqt/address_dialogs.py index 7b73152d..56cf7cc5 100644 --- a/src/bitmessageqt/address_dialogs.py +++ b/src/bitmessageqt/address_dialogs.py @@ -1,7 +1,7 @@ """ Dialogs that work with BM address. """ -# pylint: disable=attribute-defined-outside-init,too-few-public-methods +# pylint: disable=attribute-defined-outside-init,too-few-public-methods,relative-import import hashlib @@ -191,8 +191,8 @@ class NewSubscriptionDialog(AddressDataDialog): else: Inventory().flush() doubleHashOfAddressData = hashlib.sha512(hashlib.sha512( - encodeVarint(addressVersion) + - encodeVarint(streamNumber) + ripe + encodeVarint(addressVersion) + + encodeVarint(streamNumber) + ripe ).digest()).digest() tag = doubleHashOfAddressData[32:] self.recent = Inventory().by_type_and_tag(3, tag) @@ -256,11 +256,7 @@ class SpecialAddressBehaviorDialog(QtGui.QDialog): self.radioButtonBehaviorMailingList.click() else: self.radioButtonBehaveNormalAddress.click() - try: - mailingListName = config.get( - self.address, 'mailinglistname') - except: - mailingListName = '' + mailingListName = config.safeGet(self.address, 'mailinglistname', '') self.lineEditMailingListName.setText( unicode(mailingListName, 'utf-8') )