Skip to content

Commit e4c2125

Browse files
committed
backport ada0160
1 parent 7997c35 commit e4c2125

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

python/plugins/MetaSearch/dialogs/maindialog.py

+13-1
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,13 @@ def record_clicked(self):
518518
return
519519

520520
identifier = get_item_data(item, 'identifier')
521-
record = self.catalog.records[identifier]
521+
try:
522+
record = self.catalog.records[identifier]
523+
except KeyError, err:
524+
QMessageBox.warning(self,
525+
self.tr('Record parsing error'),
526+
'Unable to locate record identifier')
527+
return
522528

523529
# if the record has a bbox, show a footprint on the map
524530
if record.bbox is not None:
@@ -734,6 +740,12 @@ def show_metadata(self):
734740
QMessageBox.warning(self, self.tr('GetRecords error'),
735741
self.tr('Error getting response: %s') % err)
736742
return
743+
except KeyError, err:
744+
QMessageBox.warning(self,
745+
self.tr('Record parsing error'),
746+
'Unable to locate record identifier')
747+
QApplication.restoreOverrideCursor()
748+
return
737749

738750
QApplication.restoreOverrideCursor()
739751

0 commit comments

Comments
 (0)