fix frappy command and usage message

This commit is contained in:
2022-06-22 18:05:28 +02:00
parent ebe01a620a
commit fbfb060e3b
2 changed files with 9 additions and 14 deletions

View File

@ -80,18 +80,13 @@ def frappy_start(**services):
frappy_config = session.devices.get('frappy_config')
for service in SERVICES:
if services.get(service) == '':
seaconn = session.devices.get('seaconn')
if seaconn and seaconn._attached_secnode:
seaconn.communicate('frappy_remove %s' % service)
seaconn = session.devices.get('seaconn')
if seaconn and seaconn._attached_secnode:
seaconn.communicate('frappy_remove %s' % service)
used_cfg = {}
# check for duplication of cfgs
for service in SERVICES:
cfginfo = services.get(service)
all_cfg = {}
new_cfg = []
remove_cfg = []
add_setups = []
for service in SERVICES:
secnode = session.devices.get('se_' + service)
cfginfo = services.get(service)
@ -103,9 +98,9 @@ def frappy_start(**services):
else:
if cfginfo:
new_cfg.append((service, secnode, cfginfo))
all_cfg[service] = cfginfo
else:
remove_cfg.append(secnode)
all_cfg[service] = cfginfo
if secnode:
secnode('')

View File

@ -49,11 +49,11 @@ printinfo("=====================================================================
printinfo("Welcome to the NICOS frappy secnode setup!")
printinfo(" ")
printinfo("Usage:")
printinfo(" frappy_main('<main cfg>') # change main SE configuration (e.g. cryostat)")
printinfo(" frappy_stick('<stick cfg>') # change sample-stick configuration")
printinfo(" frappy_stick('') # remove stick")
printinfo(" frappy_main('') # remove main SE apparatus")
printinfo(" frappy_main() # show the current SE configuration")
printinfo(" frappy('<main cfg>') # change main SE configuration (e.g. cryostat)")
printinfo(" frappy('<main cfg>', '<stick cfg>') # change main and stick cfg")
printinfo(" frappy(stick='') # remove stick")
printinfo(" frappy('') # remove main SE apparatus")
printinfo(" frappy() # show the current SE configuration")
printinfo("=======================================================================================")
set_se_list()
'''