From 5e9b0833f1291597557f1f0ae294f356d5cf7d42 Mon Sep 17 00:00:00 2001 From: ximenes Date: Tue, 10 Mar 2020 10:43:19 -0300 Subject: [PATCH] Fix bug in devices.tune --- siriuspy/siriuspy/VERSION | 2 +- siriuspy/siriuspy/devices/tune.py | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/siriuspy/siriuspy/VERSION b/siriuspy/siriuspy/VERSION index 815d5ca06..66e2ae6c2 100644 --- a/siriuspy/siriuspy/VERSION +++ b/siriuspy/siriuspy/VERSION @@ -1 +1 @@ -1.19.0 +1.19.1 diff --git a/siriuspy/siriuspy/devices/tune.py b/siriuspy/siriuspy/devices/tune.py index fed292aa8..bc918f3e6 100644 --- a/siriuspy/siriuspy/devices/tune.py +++ b/siriuspy/siriuspy/devices/tune.py @@ -70,11 +70,14 @@ class DEVICES: def __init__(self, devname): """.""" - if devname == Tune.DEVICES.ALL: - tune_frac_h = TuneFrac(TuneFrac.DEVICES.SI_H) - tune_frac_v = TuneFrac(TuneFrac.DEVICES.SI_V) - tune_proc_h = TuneProc(TuneProc.DEVICES.SI_H) - tune_proc_v = TuneProc(TuneProc.DEVICES.SI_V) + # check if device exists + if devname not in Tune.DEVICES.ALL: + raise NotImplementedError(devname) + + tune_frac_h = TuneFrac(TuneFrac.DEVICES.SI_H) + tune_frac_v = TuneFrac(TuneFrac.DEVICES.SI_V) + tune_proc_h = TuneProc(TuneProc.DEVICES.SI_H) + tune_proc_v = TuneProc(TuneProc.DEVICES.SI_V) devices = (tune_frac_h, tune_frac_v, tune_proc_h, tune_proc_v)