misc/migration/3.15.0_common.py
author Julien Cristau <julien.cristau@logilab.fr>
Tue, 14 May 2013 18:02:24 +0200
branchstable
changeset 8983 2a244f90a1e3
parent 8410 eb6a607a0067
permissions -rw-r--r--
[dbapi] fix connect backwards compat harder Passing None as group and host should result in "pyro:///cubicweb.appid", not "pyro://None/None.appid". Followup for 2091d275fe5c. Closes #2882666.

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