Made post_gen_project more robust

This commit is contained in:
Daniel Roy Greenfeld 2016-04-25 15:05:59 -07:00
parent 7a5712c379
commit 7e89db8b3a

View File

@ -98,10 +98,12 @@ def remove_pycharm_dir(project_directory):
if it isn't going to be used if it isn't going to be used
""" """
idea_dir_location = os.path.join(PROJECT_DIRECTORY, '.idea/') idea_dir_location = os.path.join(PROJECT_DIRECTORY, '.idea/')
shutil.rmtree(idea_dir_location) if os.path.exists(idea_dir_location):
shutil.rmtree(idea_dir_location)
docs_dir_location = os.path.join(PROJECT_DIRECTORY, 'docs/pycharm/') docs_dir_location = os.path.join(PROJECT_DIRECTORY, 'docs/pycharm/')
shutil.rmtree(docs_dir_location) if os.path.exists(docs_dir_location):
shutil.rmtree(docs_dir_location)
def remove_heroku_files(): def remove_heroku_files():