From abea17ded94bdda1d61071c8cba8d878f78c17e9 Mon Sep 17 00:00:00 2001 From: Peter Surda Date: Thu, 21 Sep 2017 19:57:34 +0200 Subject: [PATCH] setup.py check if directory already exists --- setup.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 44356e7e..0851b78f 100644 --- a/setup.py +++ b/setup.py @@ -11,10 +11,16 @@ from src.version import softwareVersion class InstallCmd(install): def run(self): # prepare icons directories - os.makedirs('desktop/icons/scalable') + try: + os.makedirs('desktop/icons/scalable') + except os.error: + pass shutil.copyfile( 'desktop/can-icon.svg', 'desktop/icons/scalable/pybitmessage.svg') - os.makedirs('desktop/icons/24x24') + try: + os.makedirs('desktop/icons/24x24') + except os.error: + pass shutil.copyfile( 'desktop/icon24.png', 'desktop/icons/24x24/pybitmessage.png')