From 147229b8020fb5455c759e37b4f060c0d082b1a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Wed, 27 Aug 2014 02:31:17 +0200 Subject: [PATCH] =?UTF-8?q?=C2=AB=C2=A0Tu=20vois=20fiston,=20c'est=20?= =?UTF-8?q?=C3=A7a=20un=20boulet.=C2=A0=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gestion/gen_confs/adherents.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gestion/gen_confs/adherents.py b/gestion/gen_confs/adherents.py index 6cf81858..157ab0d1 100644 --- a/gestion/gen_confs/adherents.py +++ b/gestion/gen_confs/adherents.py @@ -126,8 +126,8 @@ class home: if homesplit[-2] != "club": if os.path.exists(symlink) and os.path.islink(symlink): os.unlink(symlink) - else: - raise OSError("Lien symbolique existant : %s" % (symlink,)) + elif os.path.exists(symlink): + raise OSError("Impossible de créer le lien %s : un fichier ou un dossier existe déjà." % (symlink,)) os.symlink(home, symlink) elif os.path.isdir(home): # Il y un répertoire existant @@ -139,8 +139,8 @@ class home: if homesplit[-2] != "club": if os.path.exists(symlink) and os.path.islink(symlink): os.unlink(symlink) - else: - raise OSError("Lien symbolique existant : %s" % (symlink,)) + elif os.path.exists(symlink): + raise OSError("Impossible de créer le lien %s : un fichier ou un dossier existe déjà." % (symlink,)) os.symlink(home, symlink) ### Quota