misc/migration/3.15.0_common.py
author pierre-yves
Fri, 14 Jun 2013 13:39:49 +0200
changeset 9022 a1cee6915ea3
parent 8410 eb6a607a0067
permissions -rw-r--r--
[req] drop from_controller on non WebRequest object (Closes #2901079) The `controller` concept is purely a web things. It does not belong to generic `req` object. The `build_url` code is slightly changed to handle that. This probably requires extended cleanup later. This is a barely used and very internal API. No deprecation period

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))