From 86673f6a8f62d7be902262239560613ab0788ebb Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Wed, 14 May 2014 17:33:37 +1000 Subject: [PATCH] Only require the IP and PORT in the config.ini if we will use them --- site_ansto/instrument/util/gen_sct.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/site_ansto/instrument/util/gen_sct.py b/site_ansto/instrument/util/gen_sct.py index 8adca4be..a7cf0227 100755 --- a/site_ansto/instrument/util/gen_sct.py +++ b/site_ansto/instrument/util/gen_sct.py @@ -1396,8 +1396,6 @@ def put_read_config(MyDriver): txt += [' if { [dict exists $v "driver"] } {'] txt += [' if { [dict get $v "driver"] == "%s" } {' % MyDriver['name']] txt += [' if { [dict get $v enabled] } {'] - txt += [' set IP [dict get $v ip]'] - txt += [' set PORT [dict get $v port]'] txt += [' set name [dict get $v name]'] txt += [' if { [dict exists $v "asyncqueue"] } {'] txt += [' set asyncqueue [dict get $v "asyncqueue"]'] @@ -1413,6 +1411,8 @@ def put_read_config(MyDriver): txt += [' }'] txt += [' }'] txt += [' set asyncqueue ${name}_queue'] + txt += [' set IP [dict get $v ip]'] + txt += [' set PORT [dict get $v port]'] txt += [' MakeAsyncQueue ${asyncqueue} ${asyncprotocol} ${IP} ${PORT}'] txt += [' if { [dict exists $v "timeout"] } {'] txt += [' ${asyncqueue} timeout "[dict get $v "timeout"]"']