make install script robust to file creation errors

This commit is contained in:
Jochen Küpper 2012-07-06 19:46:30 +02:00 committed by nojhan
commit 04f6367bac

View file

@ -31,8 +31,16 @@ def uninstall():
print('All symlinks have been removed.') print('All symlinks have been removed.')
def install(): def install():
for dirname in DATA['dirs']: os.mkdir(dirname) for dirname in DATA['dirs']:
for src, dst in DATA['links']: os.symlink(src, dst) try:
os.makedirs(dirname)
except(os.error):
pass
for src, dst in DATA['links']:
try:
os.symlink(src, dst)
except:
pass
print('All symlinks have been installed.') print('All symlinks have been installed.')
def data(): def data():