Commit 5ff052c0 authored by Klaus Aehlig's avatar Klaus Aehlig

Only upgrade configs not upgraded

Whenever we set a configuration, we also upgrade it.
In particular, there is no need for an unconditional upgrade;
so avoid upgrading the configuration over and over again
if it did not change.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarPetr Pudlak <pudlak@google.com>
parent a88a245e
......@@ -2824,13 +2824,10 @@ class ConfigWriter(object):
try:
if dict_data is not None:
self._SetConfigData(objects.ConfigData.FromDict(dict_data))
self._UpgradeConfig()
except Exception, err:
raise errors.ConfigurationError(err)
# Transitional fix until ConfigWriter is completely rewritten into
# Haskell
self._UpgradeConfig()
def _CloseConfig(self, save):
"""Release resources relating the config data.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment