misc/migration/3.15.0_common.py
author Vladimir Popescu <vladimir.popescu@logilab.fr>
Thu, 25 Apr 2013 10:57:01 +0200
changeset 8927 885dea8f16a0
parent 8410 eb6a607a0067
permissions -rw-r--r--
[cubicweb/doc] Replace dc_type() by cw_etype dc_type() is may be translated. Leading to terrible terrible damage.

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