From 21a28a13c99246d7c5aa91dc86f1657d05db8422 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 22 Aug 2015 21:05:05 +0800 Subject: [PATCH] gui/explorer: less verbose error dialogs --- artiq/gui/explorer.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/artiq/gui/explorer.py b/artiq/gui/explorer.py index e61a451f0..a1c16a346 100644 --- a/artiq/gui/explorer.py +++ b/artiq/gui/explorer.py @@ -1,5 +1,4 @@ import asyncio -import traceback from quamash import QtGui, QtCore from pyqtgraph import dockarea @@ -136,12 +135,12 @@ class _ArgumentSetter(LayoutWidget): for arg, entry in self._args_to_entries.items(): try: r[arg] = entry.get_argument_value() - except: + except Exception as e: if show_error_message: msgbox = QtGui.QMessageBox(self.dialog_parent) msgbox.setWindowTitle("Error") - msgbox.setText("Failed to obtain value for argument '{}'.\n{}" - .format(arg, traceback.format_exc())) + msgbox.setText("Failed to obtain value for argument '{}':\n{}" + .format(arg, str(e))) msgbox.setStandardButtons(QtGui.QMessageBox.Ok) msgbox.show() return None