+ def _load_instance_conf_envs(self, cname):
+ """
+ Try to load an instance-specific env file. If not found,
+ just return an empty dict.
+ """
+ if PER_INSTANCE_ENV_CONFIGURATION_FOLDER is None:
+ return dict()
+ try:
+ path = os.path.expanduser(PER_INSTANCE_ENV_CONFIGURATION_FOLDER)
+ path = os.path.join(path, "{}.env.yml".format(cname))
+ res = load_yaml(path)
+ LOG.info("Loaded instance-specific env file for '{}': {}"
+ .format(cname, res))
+ return res
+ except BaseException as ex:
+ LOG.info("No instance-specific env file found for: {}"
+ .format(cname))
+ del ex
+ return dict()
+