Skip to content
Permalink
Browse files

safeguard cases where the CSW record output is erroneous

  • Loading branch information
tomkralidis committed Feb 26, 2015
1 parent a41094d commit ada01603cb7b10786436aa0ed2361743b52ce48f
Showing with 13 additions and 1 deletion.
  1. +13 −1 python/plugins/MetaSearch/dialogs/maindialog.py
@@ -518,7 +518,13 @@ def record_clicked(self):
return

identifier = get_item_data(item, 'identifier')
record = self.catalog.records[identifier]
try:
record = self.catalog.records[identifier]
except KeyError, err:
QMessageBox.warning(self,
self.tr('Record parsing error'),
'Unable to locate record identifier')
return

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

QApplication.restoreOverrideCursor()

0 comments on commit ada0160

Please sign in to comment.
You can’t perform that action at this time.