vaultmanager/lib/VaultClient.py
def read_string_with_env(self, string):
        """
        If string received contains ENV{{env_var_name}},
        return environment variable value.
        If the env var is not found, return string given

        :param string: name of the env var to look for
        :type string: str

        :return: str
        """
        if not string or not isinstance(string, str):
            return string
        match = re.findall("ENV{{(.+)}}", string)
        if len(match) == 1:
            self.logger.debug("Env var found: %s" % match[0])
            if not self.dry_run():
                if match[0] not in os.environ:
                    self.logger.error(
                        "'%s' not found in environment" % match[0]
                    )
                return os.getenv(match[0], string)
        return string

        If string received contains ENV{{env_var_name}},
        return environment variable value.
        If the env var is not found, return string given

        :param string: name of the env var to look for
        :type string: str

        :return: str
        
If string received contains ENV{{env_var_name}},
return environment variable value.
If the env var is not found, return string given
If string received contains ENV {{ env_var_name }} return environment variable value . If the env var is not found return string given
def read_string_with_env(self, string):
        if not string or not isinstance(string, str):
            return string
        match = re.findall("ENV{{(.+)}}", string)
        if len(match) == 1:
            self.logger.debug("Env var found: %s" % match[0])
            if not self.dry_run():
                if match[0] not in os.environ:
                    self.logger.error(
                        "'%s' not found in environment" % match[0]
                    )
                return os.getenv(match[0], string)
        return string
def read_string_with_env ( self , string ) : if not string or not isinstance ( string , str ) : return string match = re . findall ( "ENV{{(.+)}}" , string ) if len ( match ) == 1 : self . logger . debug ( "Env var found: %s" % match [ 0 ] ) if not self . dry_run ( ) : if match [ 0 ] not in os . environ : self . logger . error ( "'%s' not found in environment" % match [ 0 ] ) return os . getenv ( match [ 0 ] , string ) return string
If string received contains ENV{{env_var_name}},
return environment variable value.
If string received contains ENV {{ env_var_name }} return environment variable value .
"""
        If string received contains ENV{{env_var_name}},
        return environment variable value.
        If the env var is not found, return string given

        :param string: name of the env var to look for
        :type string: str

        :return: str
        """
None
self
string
name of the env var to look for
name of the env var to look for