setup.py check if directory already exists

This commit is contained in:
Peter Šurda 2017-09-21 19:57:34 +02:00
parent 680cc2cafc
commit abea17ded9
Signed by untrusted user: PeterSurda
GPG Key ID: 0C5F50C0B5F37D87

View File

@ -11,10 +11,16 @@ from src.version import softwareVersion
class InstallCmd(install): class InstallCmd(install):
def run(self): def run(self):
# prepare icons directories # prepare icons directories
os.makedirs('desktop/icons/scalable') try:
os.makedirs('desktop/icons/scalable')
except os.error:
pass
shutil.copyfile( shutil.copyfile(
'desktop/can-icon.svg', 'desktop/icons/scalable/pybitmessage.svg') '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( shutil.copyfile(
'desktop/icon24.png', 'desktop/icons/24x24/pybitmessage.png') 'desktop/icon24.png', 'desktop/icons/24x24/pybitmessage.png')