« Tu vois fiston, c'est ça un boulet. »
This commit is contained in:
parent
e6bd4e9323
commit
147229b802
1 changed files with 4 additions and 4 deletions
|
@ -126,8 +126,8 @@ class home:
|
||||||
if homesplit[-2] != "club":
|
if homesplit[-2] != "club":
|
||||||
if os.path.exists(symlink) and os.path.islink(symlink):
|
if os.path.exists(symlink) and os.path.islink(symlink):
|
||||||
os.unlink(symlink)
|
os.unlink(symlink)
|
||||||
else:
|
elif os.path.exists(symlink):
|
||||||
raise OSError("Lien symbolique existant : %s" % (symlink,))
|
raise OSError("Impossible de créer le lien %s : un fichier ou un dossier existe déjà." % (symlink,))
|
||||||
os.symlink(home, symlink)
|
os.symlink(home, symlink)
|
||||||
elif os.path.isdir(home):
|
elif os.path.isdir(home):
|
||||||
# Il y un répertoire existant
|
# Il y un répertoire existant
|
||||||
|
@ -139,8 +139,8 @@ class home:
|
||||||
if homesplit[-2] != "club":
|
if homesplit[-2] != "club":
|
||||||
if os.path.exists(symlink) and os.path.islink(symlink):
|
if os.path.exists(symlink) and os.path.islink(symlink):
|
||||||
os.unlink(symlink)
|
os.unlink(symlink)
|
||||||
else:
|
elif os.path.exists(symlink):
|
||||||
raise OSError("Lien symbolique existant : %s" % (symlink,))
|
raise OSError("Impossible de créer le lien %s : un fichier ou un dossier existe déjà." % (symlink,))
|
||||||
os.symlink(home, symlink)
|
os.symlink(home, symlink)
|
||||||
|
|
||||||
### Quota
|
### Quota
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue