def _make_id(self): myid = 'M' + version.split()[0].replace('.', '-') myid = myid + ('-' * (8-len(myid)))+sha(repr(time())+ ' ' + str(getpid())).digest()[-6:].encode('hex') return myid
def make_id(): myid = 'M' + version.split()[0].replace('.', '-') padded = myid[:8] + '-' * (8 - len(myid)) myid = padded + os.urandom(6).encode('hex') return myid
def make_id(): myid = 'M' + version.split()[0].replace('.', '-') myid = myid + ('-' * (8-len(myid)))+sha(repr(time())+ ' ' + str(getpid())).digest()[-6:].encode('hex') return myid