diff --git a/gui/qt/contact_list.py b/gui/qt/contact_list.py index 834b4b98..719989ff 100644 --- a/gui/qt/contact_list.py +++ b/gui/qt/contact_list.py @@ -61,7 +61,7 @@ class ContactList(MyTreeWidget): def import_contacts(self): wallet_folder = self.parent.get_wallet_folder() - filename = QFileDialog.getOpenFileName(self.parent, "Select your wallet file", wallet_folder) + filename, _ = QFileDialog.getOpenFileName(self.parent, "Select your wallet file", wallet_folder) if not filename: return self.parent.contacts.import_file(filename) diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py index f0db3537..b1bb9c80 100644 --- a/gui/qt/installwizard.py +++ b/gui/qt/installwizard.py @@ -179,7 +179,7 @@ class InstallWizard(QDialog, MessageBoxMixin, BaseWizard): wallet_folder = os.path.dirname(self.storage.path) def on_choose(): - path = QFileDialog.getOpenFileName(self, "Select your wallet file", wallet_folder) + path, _ = QFileDialog.getOpenFileName(self, "Select your wallet file", wallet_folder) if path: self.name_e.setText(path) diff --git a/gui/qt/invoice_list.py b/gui/qt/invoice_list.py index 8b6f09ec..b4fd2870 100644 --- a/gui/qt/invoice_list.py +++ b/gui/qt/invoice_list.py @@ -64,7 +64,7 @@ class InvoiceList(MyTreeWidget): def import_invoices(self): wallet_folder = self.parent.get_wallet_folder() - filename = QFileDialog.getOpenFileName(self.parent, "Select your wallet file", wallet_folder) + filename, _ = QFileDialog.getOpenFileName(self.parent, "Select your wallet file", wallet_folder) if not filename: return self.parent.invoices.import_file(filename) diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py index f34f0241..1d43e81a 100644 --- a/gui/qt/main_window.py +++ b/gui/qt/main_window.py @@ -390,7 +390,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): def open_wallet(self): wallet_folder = self.get_wallet_folder() - filename = QFileDialog.getOpenFileName(self, "Select your wallet file", wallet_folder) + filename, _ = QFileDialog.getOpenFileName(self, "Select your wallet file", wallet_folder) if not filename: return self.gui_object.new_window(filename) @@ -584,7 +584,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError): # custom wrappers for getOpenFileName and getSaveFileName, that remember the path selected by the user def getOpenFileName(self, title, filter = ""): directory = self.config.get('io_dir', os.path.expanduser('~')) - fileName = QFileDialog.getOpenFileName(self, title, directory, filter) + fileName, _ = QFileDialog.getOpenFileName(self, title, directory, filter) if fileName and directory != os.path.dirname(fileName): self.config.set_key('io_dir', os.path.dirname(fileName), True) return fileName diff --git a/gui/qt/qrtextedit.py b/gui/qt/qrtextedit.py index 2b7bd959..56135533 100644 --- a/gui/qt/qrtextedit.py +++ b/gui/qt/qrtextedit.py @@ -46,7 +46,7 @@ class ScanQRTextEdit(ButtonsTextEdit, MessageBoxMixin): run_hook('scan_text_edit', self) def file_input(self): - fileName = QFileDialog.getOpenFileName(self, 'select file') + fileName, _ = QFileDialog.getOpenFileName(self, 'select file') if not fileName: return with open(fileName, "r") as f: diff --git a/plugins/trezor/qt_generic.py b/plugins/trezor/qt_generic.py index 147b8ce7..c83aeaff 100644 --- a/plugins/trezor/qt_generic.py +++ b/plugins/trezor/qt_generic.py @@ -377,7 +377,7 @@ class SettingsDialog(WindowModalDialog): def change_homescreen(): from PIL import Image # FIXME dialog = QFileDialog(self, _("Choose Homescreen")) - filename = dialog.getOpenFileName() + filename, _ = dialog.getOpenFileName() if filename: im = Image.open(str(filename)) if im.size != (hs_cols, hs_rows):