Skip to content

Commit

Permalink
Improve cleanup warning message
Browse files Browse the repository at this point in the history
  • Loading branch information
yakky committed Feb 12, 2016
1 parent 7269bc6 commit ff49c32
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Expand Up @@ -3,6 +3,11 @@
History
-------

0.8.7 (unreleased)
++++++++++++++++++

* Add clearer cleanup message

0.8.6 (2016-02-05)
++++++++++++++++++

Expand Down
10 changes: 7 additions & 3 deletions djangocms_installer/install/__init__.py
Expand Up @@ -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))
Expand Down

0 comments on commit ff49c32

Please sign in to comment.