From e3c7d37d3716421ac5c83900f795d20ea3d4e53d Mon Sep 17 00:00:00 2001 From: x07maop Date: Wed, 30 Mar 2016 14:35:59 +0200 Subject: [PATCH] Closedown --- script/local.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/script/local.py b/script/local.py index b3d1e67..44af1ef 100644 --- a/script/local.py +++ b/script/local.py @@ -104,14 +104,13 @@ def wait_device(dev, value, timeout=-1): print "Waiting " + dev.getName() + " = " + str(value) dev.waitValue(value,timeout) print "Done waiting" - - -def convert_file(input_file_name, output_file_name, mode): + +def convert_file(input_file_name, output_file_name, pol = None): print "Converting data file: " + input_file_name + " to " + output_file_name sep = "\t" line_sep = "\n" - - pol = str(pol_angle.read() if (MODE == "LINEAR") else pol_mode.readback.read()) + if pol is None: + pol = str(pol_angle.read() if (MODE == "LINEAR") else pol_mode.readback.read()) with open(input_file_name) as inp: lines = inp.readlines() with open(output_file_name, "wb") as out: