def _migrate_legacy_app_data_if_just_upgraded_and_user_agrees():
if is_cli_base_dir_untouched() and legacy_base_dir_exists():
print('Application data from previous Indy version has been found')
answer = prompt('Do you want to migrate it? [Y/n] ')
if not answer or answer.upper().startswith('Y'):
try:
combined_migration.migrate()
# Invalidate config caches to pick up overridden config
# parameters from migrated application data
invalidate_config_caches()
print('Application data has been migrated')
except Exception as e:
print('Error occurred when trying to migrate'
' application data: {}'.format(e))
traceback.print_exc()
print('Application data has not been migrated')
else:
print('Application data was not migrated')
评论列表
文章目录