From 5c5e2c883aa2b410e4badda425b60464d163a758 Mon Sep 17 00:00:00 2001 From: boccioli_m Date: Thu, 25 Jun 2015 11:10:48 +0200 Subject: [PATCH] Script execution --- .../Collimator Tests/Motor Test 2/Motor Test 2.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py b/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py index 7f7148a..6d2e146 100644 --- a/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py +++ b/script/tests/tests/Collimator Tests/Motor Test 2/Motor Test 2.py @@ -7,15 +7,17 @@ import traceback #by default, failed ret = 'Test failed' status = False +DEVICE = device +params = parameters #DEVICE = 'PO2DV-NCS-LS' #get parameters from the calling interface try: print "Running test Motor Test 2 with the following parameters:" - print parameters - middle = float(parameters["midPoint"]["value"]) - loopTimes = int(parameters["repeatTimes"]["value"]) - span = float(parameters["spanFromMidPoint"]["value"]) + print params + middle = float(params["midPoint"]["value"]) + loopTimes = int(params["repeatTimes"]["value"]) + span = float(params["spanFromMidPoint"]["value"]) except: print "Could not retrieve testing parameters: ", sys.exc_info()[0] ret = 'Could not retrieve testing parameters - ' + traceback.format_exc()