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

Merge branch 'dev' into 'master'

Patch 2.0.1

See merge request !13
parents 72318436 7fd40e13
No related branches found
Tags v2.0.1
2 merge requests!15Fix cryptography requirement version,!13Patch 2.0.1
...@@ -64,9 +64,11 @@ class DeploySpeciesStack(speciesData.SpeciesData): ...@@ -64,9 +64,11 @@ class DeploySpeciesStack(speciesData.SpeciesData):
if constants.CONF_TRIPAL_BANNER_PATH in self.config.keys(): if constants.CONF_TRIPAL_BANNER_PATH in self.config.keys():
if not config[constants.CONF_TRIPAL_BANNER_PATH] == "" and os.path.isfile(os.path.abspath(config[constants.CONF_TRIPAL_BANNER_PATH])): if not config[constants.CONF_TRIPAL_BANNER_PATH] == "" and os.path.isfile(os.path.abspath(config[constants.CONF_TRIPAL_BANNER_PATH])):
banner_dest_path = os.path.join(self.species_dir, os.path.abspath("banner.png")) banner_dest_path = os.path.join(self.species_dir, os.path.abspath("banner.png"))
if not os.path.isfile(banner_dest_path) and not os.path.islink(banner_dest_path) and not os.path.samefile(os.path.abspath(config[constants.CONF_TRIPAL_BANNER_PATH]),banner_dest_path): if not os.path.isfile(banner_dest_path) and not os.path.islink(banner_dest_path):
os.symlink(os.path.abspath(self.config[constants.CONF_TRIPAL_BANNER_PATH]), banner_dest_path) os.symlink(os.path.abspath(self.config[constants.CONF_TRIPAL_BANNER_PATH]), banner_dest_path)
logging.info("Custom banner added: symlink from %s" % self.config[constants.CONF_TRIPAL_BANNER_PATH]) logging.info("Custom banner added: symlink from %s" % self.config[constants.CONF_TRIPAL_BANNER_PATH])
else:
logging.info("Banner already exists at %s. The banner defined in config is not added." % banner_dest_path)
else: else:
logging.debug("Using default banner for Tripal pages because %s is not valid in 'config' file" % constants.CONF_TRIPAL_BANNER_PATH) logging.debug("Using default banner for Tripal pages because %s is not valid in 'config' file" % constants.CONF_TRIPAL_BANNER_PATH)
self.config.pop(constants.CONF_TRIPAL_BANNER_PATH, None) self.config.pop(constants.CONF_TRIPAL_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