File tree 1 file changed +13
-1
lines changed
python/plugins/MetaSearch/dialogs
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -518,7 +518,13 @@ def record_clicked(self):
518
518
return
519
519
520
520
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
522
528
523
529
# if the record has a bbox, show a footprint on the map
524
530
if record .bbox is not None :
@@ -734,6 +740,12 @@ def show_metadata(self):
734
740
QMessageBox .warning (self , self .tr ('GetRecords error' ),
735
741
self .tr ('Error getting response: %s' ) % err )
736
742
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
737
749
738
750
QApplication .restoreOverrideCursor ()
739
751
You can’t perform that action at this time.
0 commit comments