Skip to content

Commit

Permalink
Add docstring
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jan 10, 2016
1 parent 4e9d8b0 commit 4e50e61
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nikola/plugins/command/init.py
Expand Up @@ -221,6 +221,8 @@ def prepare_config(config):
return p

def test_destination(destination, demo=False):
"""Check if the destination already exists, which can break demo site creation."""
# Issue #2214
if demo and os.path.exists(destination):
LOGGER.warning("The directory {0} already exists, and a new demo site cannot be initialized in an existing directory.".format(destination))
LOGGER.warning("Please remove the directory and try again, or use another directory.")
Expand Down

0 comments on commit 4e50e61

Please sign in to comment.