def _gen_password_wrapper()

in taskcat/_template_params.py [0:0]


    def _gen_password_wrapper(self, gen_regex, type_regex, count_regex):
        if gen_regex.search(self.param_value):
            passlen = int(self.regxfind(count_regex, self.param_value))
            gentype = self.regxfind(type_regex, self.param_value)
            # Additional computation to identify if the gentype is one of the desired
            # values. Sample gentype values would be '8A]' or '24S]' or '2]' To get
            # the correct gentype, get 2nd char from the last and check if its A or S
            gentype = gentype[-2]
            if gentype in ("a", "A", "s", "S"):
                gentype = gentype.upper()
            else:
                gentype = None
            if not gentype:
                # Set default password type
                # A value of PrintMsg.DEBUG will generate a simple alpha
                # aplha numeric password
                gentype = "D"

            if passlen:
                param_value = self.genpassword(passlen, gentype)
                self._regex_replace_param_value(gen_regex, param_value)