From: Carlos P. <cpa...@ce...> - 2016-08-23 14:37:37
|
Applied to support-3.x and develop branches. On martes, 23 de agosto de 2016 15:22:21 (CEST) Zbigniew Reszela wrote: > From: zreszela <zre...@ce...> > > "MntGrpConfigs" is of CaselessDict type which maintains keys in lowercase. > However the "ActiveMntGrp" maintains the case sensitivity. Compare these two > using the CaselessDict.__contains__ implementation (using the in operator > for the dictionary instead of its list of keys). > --- > lib/taurus/qt/qtgui/taurusgui/macrolistener.py | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > > diff --git a/lib/taurus/qt/qtgui/taurusgui/macrolistener.py > b/lib/taurus/qt/qtgui/taurusgui/macrolistener.py index 359eedb..fb4f63d > 100644 > --- a/lib/taurus/qt/qtgui/taurusgui/macrolistener.py > +++ b/lib/taurus/qt/qtgui/taurusgui/macrolistener.py > @@ -119,14 +119,15 @@ class DynamicPlotManager(Qt.QObject, > TaurusBaseComponent): QDoor.getExperimentDescription` > for more details > ''' > - if expconf['ActiveMntGrp'] is None: > + activeMntGrp = expconf['ActiveMntGrp'] > + if activeMntGrp is None: > return > - if expconf['ActiveMntGrp'] not in expconf['MntGrpConfigs'].keys(): > + if activeMntGrp not in expconf['MntGrpConfigs']: > self.warning( > "ActiveMntGrp '%s' is not defined" % > - expconf['ActiveMntGrp']) > + activeMntGrp) > return > - mgconfig = expconf['MntGrpConfigs'][expconf['ActiveMntGrp']] > + mgconfig = expconf['MntGrpConfigs'][activeMntGrp] > channels = dict(getChannelConfigs(mgconfig, sort=False)) > > #classify by type of plot: -- +----------------------------------------------------+ Carlos Pascual Izarra Scientific Software Coordinator Computing Division ALBA Synchrotron [http://www.albasynchrotron.es] Carrer de la Llum 2-26 E-08290 Cerdanyola del Valles (Barcelona), Spain E-mail: cpa...@ce... Phone: +34 93 592 4428 +----------------------------------------------------+ |