fix also frappy('reload') on confirmed sea device

This commit is contained in:
2023-09-18 11:35:32 +02:00
parent a2a309a1d5
commit 27cd5cc2e4

View File

@ -75,7 +75,7 @@ def frappy(*args, main=None, stick=None, addons=None, force=False):
if addons is not None:
raise TypeError('got multiple values for addons')
addons = ','.join(alist)
if confirmed and confirmed != main and main is not None and not force:
if confirmed and confirmed != main and main not in (None, 'restart') and not force:
session.log.warning('%r is plugged to the cryostat control rack', confirmed)
session.log.warning('if you are sure, use frappy(..., force=True)', confirmed)
raise TypeError('refuse to override plugged device')