Skip to content
Snippets Groups Projects
Commit 6d9203b8 authored by Loraine Gueguen's avatar Loraine Gueguen
Browse files

Fix banner

parent 1b2e200c
No related branches found
No related tags found
2 merge requests!9Release 2.0 (merge dev to master),!6Todo release 1.1
......@@ -62,12 +62,10 @@ class DeploySpeciesStack(speciesData.SpeciesData):
# use the default banner instead
if "banner_path" in self.config.keys():
if not config["banner_path"] == "" and os.path.isfile(os.path.abspath(config["banner_path"])):
try:
logging.info("Custom banner path: %s" % self.config["banner_path"])
shutil.copy(os.path.abspath(self.config["banner_path"]), "%s/banner.png" % self.species_dir)
except FileNotFoundError:
logging.warning("Could not copy specified banner (%s), using default banner instead" % self.config["banner_path"])
self.config.pop("banner_path", None)
banner_dest_path = os.path.join(self.main_dir,"/banner.png")
logging.info("Custom banner path: %s" % self.config["banner_path"])
if os.path.isfile(os.path.abspath(config["banner_path"])) != banner_dest_path:
shutil.copy(os.path.abspath(self.config["banner_path"]), banner_dest_path)
else:
logging.debug("Using default banner for Tripal pages")
self.config.pop("banner_path", None)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment