misc/migration/3.15.0_common.py
author Pierre-Yves David <pierre-yves.david@logilab.fr>
Mon, 24 Jun 2013 14:55:26 +0200
changeset 9046 6fb3f0106301
parent 8410 eb6a607a0067
permissions -rw-r--r--
[dbapi] move ProgrammingError into cubicweb module A new ``repoapi`` will be introduced as a replacement for the dbapi. It will need ProgrammingError too. Related to #2503918

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