From 57ab77f5d8419edfd29dc41587ec00a5268dc982 Mon Sep 17 00:00:00 2001 From: Loraine Gueguen <loraine.gueguen@sb-roscoff.fr> Date: Fri, 7 May 2021 12:06:32 +0200 Subject: [PATCH] fix banner condition --- gga_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gga_init.py b/gga_init.py index f9e01d6..673df13 100755 --- a/gga_init.py +++ b/gga_init.py @@ -63,7 +63,7 @@ class DeploySpeciesStack(speciesData.SpeciesData): if "banner_path" in self.config.keys(): if not config["banner_path"] == "" and os.path.isfile(os.path.abspath(config["banner_path"])): banner_dest_path = os.path.join(self.species_dir, os.path.abspath("banner.png")) - if not os.path.samefile(os.path.abspath(config["banner_path"]),banner_dest_path): + if not os.path.isfile(banner_dest_path) or not os.path.samefile(os.path.abspath(config["banner_path"]),banner_dest_path): os.symlink(os.path.abspath(self.config["banner_path"]), banner_dest_path) logging.info("Custom banner added: symlink from %s" % self.config["banner_path"]) else: -- GitLab