From ff49c32bf243db143da28353ed1c6ebba0938842 Mon Sep 17 00:00:00 2001 From: Iacopo Spalletti Date: Fri, 12 Feb 2016 07:01:00 +0100 Subject: [PATCH] Improve cleanup warning message --- HISTORY.rst | 5 +++++ djangocms_installer/install/__init__.py | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 35d9213..0671c74 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,11 @@ History ------- +0.8.7 (unreleased) +++++++++++++++++++ + +* Add clearer cleanup message + 0.8.6 (2016-02-05) ++++++++++++++++++ diff --git a/djangocms_installer/install/__init__.py b/djangocms_installer/install/__init__.py index a5d35cc..399650d 100644 --- a/djangocms_installer/install/__init__.py +++ b/djangocms_installer/install/__init__.py @@ -117,13 +117,17 @@ def cleanup_directory(config_data): choice = 'N' if config_data.noinput is False and not config_data.verbose: choice = query_yes_no( - 'Failure occurred. Do you want to cleanup by removing {0}? '.format( + 'The installation failed.\n' + 'Do you want to clean up by removing {0}?\n' + '\tWarning: this will delete all files in:\n' + '\t\t{0}\n' + 'Do you want to cleanup?'.format( os.path.abspath(config_data.project_directory) ), - 'yes' + 'no' ) else: - sys.stdout.write('Failure occurred.\n') + sys.stdout.write('The installation failed.\n') if choice or config_data.noinput: sys.stdout.write('Removing everything under %s\n' '' % os.path.abspath(config_data.project_directory))