Skip to content

Commit

Permalink
Merge pull request #242 from nephila/feature/improve_cleanup
Browse files Browse the repository at this point in the history
Improve cleanup warning message
  • Loading branch information
yakky committed Feb 12, 2016
2 parents 7269bc6 + ff49c32 commit 1462f32
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 1462f32

Please sign in to comment.