From dae6852fb0bd8f3e537f196360e4c53d6419e3f7 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Wed, 9 Dec 2015 09:03:18 +0100 Subject: [PATCH] [fix] won't work if dir doesn't exists --- prosopopee/prosopopee.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/prosopopee/prosopopee.py b/prosopopee/prosopopee.py index 3551be7..12737e1 100644 --- a/prosopopee/prosopopee.py +++ b/prosopopee/prosopopee.py @@ -66,7 +66,8 @@ def main(): os.makedirs("build") # XXX recursively merge directories - shutil.rmtree(os.path.join(os.getcwd(), "build", "static")) + if os.path.exists(os.path.join(os.getcwd(), "build", "static")): + shutil.rmtree(os.path.join(os.getcwd(), "build", "static")) shutil.copytree(os.path.join(os.path.split(os.path.realpath(__file__))[0], "static"), os.path.join(os.getcwd(), "build", "static")) for gallery in dirs: