make install script robust to file creation errors
This commit is contained in:
parent
07fede786f
commit
04f6367bac
1 changed files with 10 additions and 2 deletions
|
|
@ -31,8 +31,16 @@ def uninstall():
|
|||
print('All symlinks have been removed.')
|
||||
|
||||
def install():
|
||||
for dirname in DATA['dirs']: os.mkdir(dirname)
|
||||
for src, dst in DATA['links']: os.symlink(src, dst)
|
||||
for dirname in DATA['dirs']:
|
||||
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.')
|
||||
|
||||
def data():
|
||||
|
|
|
|||
Reference in a new issue