Skip to content

Commit

Permalink
misc. fixes for python3
Browse files Browse the repository at this point in the history
  • Loading branch information
ecdsa committed Aug 26, 2017
1 parent 4f516dc commit f1a8c0b
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gui/qt/main_window.py
Expand Up @@ -1224,7 +1224,7 @@ def from_list_menu(self, position):
menu.exec_(self.from_list.viewport().mapToGlobal(position))

def set_pay_from(self, coins):
self.pay_from = coins
self.pay_from = list(coins)
self.redraw_from_list()

def redraw_from_list(self):
Expand Down
2 changes: 1 addition & 1 deletion gui/qt/util.py
Expand Up @@ -470,7 +470,7 @@ def editing_finished(self):

def on_edited(self, item, column, prior):
'''Called only when the text actually changes'''
key = str(item.data(0, Qt.UserRole).toString())
key = item.data(0, Qt.UserRole)
text = item.text(column)
self.parent.wallet.set_label(key, text)
self.parent.history_list.update_labels()
Expand Down
2 changes: 1 addition & 1 deletion lib/exchange_rate.py
Expand Up @@ -46,7 +46,7 @@ def get_json(self, site, get_string):
def get_csv(self, site, get_string):
url = ''.join(['https://', site, get_string])
response = requests.request('GET', url, headers={'User-Agent' : 'Electrum'})
reader = csv.DictReader(response.content.split('\n'))
reader = csv.DictReader(response.content.decode().split('\n'))
return list(reader)

def name(self):
Expand Down
2 changes: 1 addition & 1 deletion plugins/audio_modem/qt.py
Expand Up @@ -57,7 +57,7 @@ def _index_changed(index):
self.modem_config = amodem.config.bitrates[bitrate]

combo = QComboBox()
combo.addItems(map(str, bitrates))
combo.addItems([str(x) for x in bitrates])
combo.currentIndexChanged.connect(_index_changed)
layout.addWidget(combo, 0, 1)

Expand Down
2 changes: 1 addition & 1 deletion plugins/labels/labels.py
Expand Up @@ -23,7 +23,7 @@ def encode(self, wallet, msg):
password, iv, wallet_id = self.wallets[wallet]
encrypted = electrum.bitcoin.aes_encrypt_with_iv(password, iv,
msg.encode('utf8'))
return base64.b64encode(encrypted)
return base64.b64encode(encrypted).decode()

def decode(self, wallet, message):
password, iv, wallet_id = self.wallets[wallet]
Expand Down

0 comments on commit f1a8c0b

Please sign in to comment.