fix circular import in frappy_sinq
This commit is contained in:
22
commands.py
22
commands.py
@@ -65,28 +65,6 @@ def all_info(all_cfg):
|
||||
return 'currently configured: %s' % ', '.join(info)
|
||||
|
||||
|
||||
def applyAliasConfig():
|
||||
"""Apply the desired aliases from session.alias_config.
|
||||
|
||||
be more quiet than original
|
||||
"""
|
||||
# reimplemented from Session.applyAliasConfig
|
||||
# apply also when target dev name does not change, as the target device might have
|
||||
# be exchanged in the mean time
|
||||
unused = set()
|
||||
for aliasname, targets in session.alias_config.items():
|
||||
if aliasname not in session.devices:
|
||||
continue # silently ignore
|
||||
aliasdev = session.getDevice(aliasname)
|
||||
for target, _ in sorted(targets, key=lambda t: -t[1]):
|
||||
if target in session.devices:
|
||||
try:
|
||||
aliasdev.alias = target
|
||||
except Exception:
|
||||
session.log.exception("could not set '%s' alias", aliasdev)
|
||||
break
|
||||
|
||||
|
||||
def frappy_start(service, cfg=None):
|
||||
if service not in SERVICES:
|
||||
raise ValueError('unknown service %s' % service)
|
||||
|
||||
Reference in New Issue
Block a user