allow missing frappy_config, stick_rotation_alias
This commit is contained in:
11
commands.py
11
commands.py
@@ -30,6 +30,7 @@ from nicos.utils import printTable
|
||||
from nicos.commands import helparglist, usercommand
|
||||
from nicos.commands.basic import AddSetup, CreateAllDevices, CreateDevice
|
||||
from nicos.devices.secop import get_attaching_devices
|
||||
from nicos_sinq.frappy_sinq.devices import applyAliasConfig
|
||||
|
||||
home = expanduser('~')
|
||||
if home not in sys.path:
|
||||
@@ -68,8 +69,9 @@ def all_info(all_cfg):
|
||||
def frappy_start(service, cfg=None):
|
||||
if service not in SERVICES:
|
||||
raise ValueError('unknown service %s' % service)
|
||||
frappy_config = session.devices['frappy_config']
|
||||
frappy_config.remove_aliases()
|
||||
frappy_config = session.devices.get('frappy_config')
|
||||
# if frappy_config():
|
||||
# frappy_config.remove_aliases()
|
||||
if cfg == '':
|
||||
seaconn = session.devices.get('seaconn')
|
||||
if seaconn and seaconn._attached_secnode:
|
||||
@@ -108,7 +110,10 @@ def frappy_start(service, cfg=None):
|
||||
if cfg is not None:
|
||||
cleanup_defunct()
|
||||
CreateAllDevices()
|
||||
frappy_config.set_envlist()
|
||||
if frappy_config:
|
||||
frappy_config.set_envlist()
|
||||
else:
|
||||
applyAliasConfig()
|
||||
if startnode and cfg == '':
|
||||
startnode.disable()
|
||||
return all_cfg
|
||||
|
||||
Reference in New Issue
Block a user