misc/migration/3.15.0_common.py
author Denis Laxalde <denis.laxalde@logilab.fr>
Wed, 25 Mar 2015 10:10:24 +0100
changeset 10276 ffb269e60348
parent 8410 eb6a607a0067
permissions -rw-r--r--
[web/request] Restore attribute setting for search_state This was dropped in 1f84295bfe95 when `search_state` attribute was turned into a property, but without a setter. So adding a setter here restoring previous behaviour, as some tests and cubes use it. Related to #4875761.

import ConfigParser
try:
    undo_actions = config.cfgfile_parser.get('MAIN', 'undo-support', False)
except ConfigParser.NoOptionError:
    pass # this conf. file was probably already migrated
else:
    config.global_set_option('undo-enabled', bool(undo_actions))