From 23cdd84f909951371e739ed60ea0c2bf18a51bb7 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 7 Nov 2007 19:29:57 +0000 Subject: [PATCH] Give a useful error message for temporary bus errors. --- src/libprs500/gui2/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/libprs500/gui2/main.py b/src/libprs500/gui2/main.py index 752cde46f0..3d68a84f61 100644 --- a/src/libprs500/gui2/main.py +++ b/src/libprs500/gui2/main.py @@ -644,8 +644,12 @@ class Main(MainWindow, Ui_MainWindow): def device_job_exception(self, id, description, exception, formatted_traceback): ''' - Handle exceptions in threaded jobs. + Handle exceptions in threaded device jobs. ''' + if 'Could not read 32 bytes on the control bus.' in str(exception): + error_dialog(self, 'Error talking to device', + 'There was a temporary error talking to the device. Please unplug and reconnect the device and or reboot.').show() + return print >>sys.stderr, 'Error in job:', description.encode('utf8') print >>sys.stderr, exception print >>sys.stderr, formatted_traceback.encode('utf8')