From: Zbigniew R. <zre...@ce...> - 2016-08-23 13:22:31
|
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: -- 1.8.4.5 |