Exemplo n.º 1
0
def _generate_log_filename(arglist):
    pieces = ['yyoom-']
    for a in arglist:
        a = a.strip()
        if not a or a.startswith("-") or sh.exists(a):
            break
        else:
            pieces.append(a)
            pieces.append("_")
    pieces.append(int(time.time()))
    pieces.append("_")
    pieces.append(utils.get_random_string(4))
    pieces.append('.log')
    return "".join([str(p) for p in pieces])
Exemplo n.º 2
0
def _generate_log_filename(arglist):
    pieces = ['yyoom-']
    for a in arglist:
        a = a.strip()
        if not a or a.startswith("-") or sh.exists(a):
            break
        else:
            pieces.append(a)
            pieces.append("_")
    pieces.append(int(time.time()))
    pieces.append("_")
    pieces.append(utils.get_random_string(4))
    pieces.append('.log')
    return "".join([str(p) for p in pieces])
Exemplo n.º 3
0
 def generate_random(self, length):
     """Returns a randomly generated password of the specified length."""
     LOG.debug("Generating a pseudo-random secret of %d characters", length)
     return utils.get_random_string(length)
Exemplo n.º 4
0
 def generate_random(self, length):
     """Returns a randomly generated password of the specified length."""
     LOG.debug("Generating a pseudo-random secret of %d characters", length)
     return utils.get_random_string(length)