def _setSectionSettings(self, section, settings):
     storedValue = g_settingsCache.getSectionSettings(section, None)
     storingValue = self._buildSectionSettings(section, settings)
     if storedValue == storingValue:
         return
     LOG_DEBUG('Applying %s server settings: ' % section, settings)
     g_settingsCache.setSectionSettings(section, storingValue)
     self.setVersion()
     self._core.onSettingsChanged(settings)
Beispiel #2
0
 def _setSectionSettings(self, section, settings):
     storedValue = g_settingsCache.getSectionSettings(section, None)
     storingValue = self._buildSectionSettings(section, settings)
     if storedValue == storingValue:
         return
     LOG_DEBUG('Applying %s server settings: ' % section, settings)
     g_settingsCache.setSectionSettings(section, storingValue)
     self.setVersion()
     self._core.onSettingsChanged(settings)
    def setSectionSettings(self, section, settings):
        storedSettings = self.getSection(section)
        storedValue = g_settingsCache.getSectionSettings(section, None)
        storingValue = self._buildSectionSettings(section, settings)
        if storedValue == storingValue:
            return
        else:
            g_settingsCache.setSectionSettings(section, storingValue)
            settingsDiff = {}
            for k, v in settings.iteritems():
                sV = storedSettings.get(k)
                if sV != v:
                    settingsDiff[k] = v

            LOG_DEBUG('Applying %s server settings: ' % section, settingsDiff)
            self._core.onSettingsChanged(settingsDiff)
            return
    def setSectionSettings(self, section, settings):
        storedSettings = self.getSection(section)
        storedValue = g_settingsCache.getSectionSettings(section, None)
        storingValue = self._buildSectionSettings(section, settings)
        if storedValue == storingValue:
            return
        else:
            g_settingsCache.setSectionSettings(section, storingValue)
            settingsDiff = {}
            for k, v in settings.iteritems():
                sV = storedSettings.get(k)
                if sV != v:
                    settingsDiff[k] = v

            LOG_DEBUG('Applying %s server settings: ' % section, settingsDiff)
            self._core.onSettingsChanged(settingsDiff)
            return