Skip to content

Commit

Permalink
BUG: show an error msgbox if file cnanot be opened, closes pcdshub#202
Browse files Browse the repository at this point in the history
  • Loading branch information
tangkong committed Sep 29, 2023
1 parent ec27c6b commit 217c1e2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions atef/widgets/config/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ def open_file(self, *args, filename: Optional[str] = None, **kwargs):
except ValidationError:
logger.error('failed to open file as either active '
'or passive checkout')
msg = QtWidgets.QMessageBox(parent=self)
msg.setIcon(QtWidgets.QMessageBox.Critical)
msg.setText('Failed to open file as either an active or passive '
'checkout. The file may be corrupted or malformed.')
msg.setWindowTitle('Could not open file')
msg.exec_()
return
self._new_tab(data=data, filename=filename)

def _new_tab(
Expand Down

0 comments on commit 217c1e2

Please sign in to comment.