Verified Commit f3b5c466 authored by David Hoese's avatar David Hoese
Browse files

Fix importing data with newer versions of Satpy

parent 0ebf598f
......@@ -922,7 +922,7 @@ class Main(QtGui.QMainWindow):
if wizard_dialog.exec_():
LOG.info("Loading products from open wizard...")
scenes = wizard_dialog.scenes
reader = list(list(scenes.values())[0].readers.keys())[0]
reader = wizard_dialog.previous_reader
importer_kwargs = {
'reader': reader,
'scenes': scenes,
......
......@@ -102,5 +102,6 @@ def test_wizard_abi_l1b(qtbot, monkeypatch):
# Verify the wizard is left in a usable state for the MainWindow
assert len(wiz.scenes) == 1
assert wiz.previous_reader == 'abi_l1b'
sel_ids = wiz.collect_selected_ids()
assert len(sel_ids) == 1
......@@ -54,7 +54,7 @@ class OpenFileWizard(QtWidgets.QWizard):
# tuple(filenames) -> scene object
self.scenes = {}
self.all_available_products = None
self._previous_reader = None
self.previous_reader = None
self.file_groups = {}
self.unknown_files = set()
app = QtWidgets.QApplication.instance()
......@@ -200,13 +200,13 @@ class OpenFileWizard(QtWidgets.QWizard):
def _group_files(self, reader) -> bool:
"""Group provided files by time step."""
# the files haven't changed since we were last run
if not self._filelist_changed and self._previous_reader == reader:
if not self._filelist_changed and self.previous_reader == reader:
return False
self._filelist_changed = False
self.file_groups = {} # reset the list, just in case
selected_files = self._all_filenames.copy()
self._previous_reader = reader
self.previous_reader = reader
file_groups = group_files(selected_files, reader=reader)
if not file_groups:
self.unknown_files = selected_files
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment