From 73c3a474dc6f4c64c9dcbb0cfa2dbbaddd2d6a30 Mon Sep 17 00:00:00 2001 From: gac-x04sa Date: Thu, 25 Jan 2018 11:04:53 +0100 Subject: [PATCH] Script execution --- script/scans/SampleSearch.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script/scans/SampleSearch.py b/script/scans/SampleSearch.py index b7cb4aa..f2de904 100644 --- a/script/scans/SampleSearch.py +++ b/script/scans/SampleSearch.py @@ -38,8 +38,9 @@ for y in frange(Y_MIN, Y_MAX, Y_STEP): print "Found x center at ", mean_val scx.move(mean_val) break - except: - print "Invalid x fit for y=", y + except Exception as e: + print "Invalid x fit for y=", y, str(e) + step += 1 r = cscan(scy, sensor, Y_MIN, Y_MAX, 0.01, latency = DIODE_SETTLING_TIME)