fixed CQ for address_dialog python file

This commit is contained in:
coolguy-cell 2020-05-30 18:26:54 +05:30
parent 3f773c78f7
commit 5cfaa9b2fa
No known key found for this signature in database
GPG Key ID: CD3A42E1D470AD70

View File

@ -1,7 +1,7 @@
""" """
Dialogs that work with BM address. 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 import hashlib
@ -191,8 +191,8 @@ class NewSubscriptionDialog(AddressDataDialog):
else: else:
Inventory().flush() Inventory().flush()
doubleHashOfAddressData = hashlib.sha512(hashlib.sha512( doubleHashOfAddressData = hashlib.sha512(hashlib.sha512(
encodeVarint(addressVersion) + encodeVarint(addressVersion)
encodeVarint(streamNumber) + ripe + encodeVarint(streamNumber) + ripe
).digest()).digest() ).digest()).digest()
tag = doubleHashOfAddressData[32:] tag = doubleHashOfAddressData[32:]
self.recent = Inventory().by_type_and_tag(3, tag) self.recent = Inventory().by_type_and_tag(3, tag)
@ -256,11 +256,7 @@ class SpecialAddressBehaviorDialog(QtGui.QDialog):
self.radioButtonBehaviorMailingList.click() self.radioButtonBehaviorMailingList.click()
else: else:
self.radioButtonBehaveNormalAddress.click() self.radioButtonBehaveNormalAddress.click()
try: mailingListName = config.safeGet(self.address, 'mailinglistname', '')
mailingListName = config.get(
self.address, 'mailinglistname')
except:
mailingListName = ''
self.lineEditMailingListName.setText( self.lineEditMailingListName.setText(
unicode(mailingListName, 'utf-8') unicode(mailingListName, 'utf-8')
) )